Can I use ConveyThis on localhost?

Yes, you can test ConveyThis on your own computer. You can’t add localhost or an IP address such as 127.0.0.1 as a website in ConveyThis, so you give your local site a name instead.

How do I test ConveyThis on localhost?

  1. Give your local site a name. The easiest way is a name that ends in .localtest.me, for example mysite.localtest.me. Every .localtest.me name points to your own computer, so you don’t need to change anything. Open your site at that name, with your port if you use one: http://mysite.localtest.me:8080/.

    Or add a name under your own domain to your computer’s hosts file, for example 127.0.0.1 dev.yourdomain.com, and set up a virtual host for it in your web server. Names ending in .test, .local or .localhost can’t be added in ConveyThis.

  2. Add that name as a website in ConveyThis. In your ConveyThis dashboard, click Add Domain, choose Other (Javascript) and enter the name, for example mysite.localtest.me. Choose your languages and copy the code on the Install step.

  3. Add the code to your local site just before the closing </body> tag, on every page or in the template that every page uses.

  4. Open your local site at that name. The language switcher appears in the bottom right corner.

Using WordPress locally? Set your WordPress site address to the same name (for example http://mysite.localtest.me:8080), then install the plugin and enter your API key as usual. See How do I add ConveyThis to WordPress?

Good to know

  • The wizard doesn’t show Code on the site as found for a local site, because ConveyThis can’t reach your computer. That’s fine: open the site in your browser to check it.
  • The local website counts as one of the websites in your plan, and the words translated there count toward your word limit. Delete it in Domains when you’re done testing.
  • When you go live, add your real domain, for example example.com. Your translations aren’t moved over automatically. See Import and export translations.