WordPress runs a very large share of business websites, and adding a chatbot to one is usually a small job. ConvoRail installs with a single script tag, the same pattern as an analytics snippet, so adding a chatbot to WordPress comes down to putting that line on every page in a safe way. This guide covers three methods, the mistakes to avoid and how to test the result. It is general guidance: WordPress themes, plugins and hosting vary, so adapt the steps to your setup.
What Do You Need Before You Start?
- Administrator access to your WordPress dashboard.
- Your chatbot's script tag. In ConvoRail, copy it from your account settings. It includes your account's API key, so copy it exactly as shown.
- A backup. Back up your site, or at least know how to restore it, before changing code.
- A starter set of answers. The widget is only useful once it has knowledge. See how to set up ConvoRail step by step.
Which Is the Best Way to Add a Script to WordPress?
For most business owners, the best way is a built-in or plugin-provided "header and footer scripts" field. It survives theme updates and needs no code editing. A developer may prefer to load the script from a child theme or a small plugin. Avoid editing a parent theme's files directly, because a theme update can erase your change.
| Method | Best for | Watch out for |
|---|---|---|
| Theme's custom code or header/footer field | Themes that include a scripts setting | Not every theme has one |
| A header and footer scripts plugin | Most site owners without a developer | Choose a maintained plugin, and check reviews and recent updates |
| Child theme or small custom plugin | Developers who want full control | Requires code, and mistakes can break the site |
Method 1: Use Your Theme's Scripts Field
- 1Open your theme's settings or customiser and look for "custom code", "header scripts" or "footer scripts".
- 2Paste the ConvoRail script tag into the footer field, or the header field if your theme offers only that.
- 3Save, then clear any caching (see below).
- 4Open your site in a private window and check that the chat launcher appears.
Method 2: Use a Header and Footer Scripts Plugin
If your theme has no scripts field, a plugin that adds header and footer scripts is the usual route. Search the plugin directory for one that is actively maintained, has a good number of recent updates and clear reviews. We do not endorse a specific plugin, and you should verify any plugin in the official directory before installing it.
- 1In the WordPress dashboard, go to Plugins and add your chosen plugin.
- 2Open the plugin's settings and find the footer scripts box.
- 3Paste the ConvoRail script tag exactly as copied and save.
- 4Clear caches and test in a private window.
Method 3: Load It Through a Child Theme or Small Plugin
Developers can enqueue the script through WordPress's script functions in a child theme or a small custom plugin. The widget needs the data attributes from your ConvoRail tag, such as the API key, so check how your approach preserves them. If you are not sure, use Method 1 or 2. A broken edit can take a site down, so test on a staging copy first.
What About WordPress.com and Managed Hosts?
Rules differ. Some WordPress.com plans and some managed hosts restrict custom scripts or plugins. If you cannot find a scripts field or cannot install plugins, check your plan's documentation or ask your host. We are not certain which plans allow it, so verify before you assume it will work.
Why Does the Widget Not Appear After Installing?
- Caching. Clear your caching plugin, your host's cache and any CDN cache, then reload in a private window.
- Script optimisation plugins. Plugins that combine, delay or remove scripts can block or alter the widget. Exclude the ConvoRail script from those features if needed.
- A modified tag. Do not edit the tag. Missing attributes, such as the API key, stop it from loading.
- Pasted into the wrong field. Make sure it is in a scripts or code field and not a text or visual-editor block that strips code.
- Page builders. Some builders have their own script areas that apply only to certain pages. Use a site-wide option.
How Do You Test It Properly?
- 1Open the homepage, a blog post, a product or service page and the contact page in a private window.
- 2Check that the launcher appears on desktop and on a phone.
- 3Ask a question you wrote an answer for, and one you did not, to confirm the bot declines to guess.
- 4Request a person and check that a teammate can reply from the inbox.
- 5Test your site speed before and after, as covered in does a chat widget slow your website.
Use the pre-launch checklist for a fuller set of checks.
What Should You Do After It Is Live?
Tell your team the chatbot is live and who watches the inbox. Review the unanswered-question list each week for the first month and add answers for repeats. If you run an online shop on WordPress, also see what an online store chatbot should answer. If your theme changes later, re-test, because a new theme can drop custom code.
What Does a 15-Minute Install Checklist Look Like?
- 1Back up the site, or confirm your host keeps recent backups.
- 2Copy the script tag from your ConvoRail account settings.
- 3Paste it into the footer scripts field, using your theme or a maintained plugin.
- 4Save, then clear every cache layer: caching plugin, host cache and CDN.
- 5Open the homepage, one blog post and the contact page in a private window.
- 6Check mobile, ask one known question, one unknown question and request a person.
- 7Note where the tag lives, so you can find it after a theme change.
How Do You Troubleshoot Quickly?
| Symptom | Likely cause | What to try |
|---|---|---|
| Widget missing on every page | Tag not saved, or cache not cleared | Re-check the field, clear all caches |
| Widget missing on some pages | Page builder or theme template excludes the footer | Use a site-wide option or check the template |
| Widget appears but cannot connect | Tag edited, or API key attribute missing | Copy the original tag again |
| Widget broke after an update | Theme change removed custom code | Re-add the tag and note its location |
Pro Tip: If you use a security plugin or firewall, check its logs when something fails to load. Settings that block unknown scripts can interfere with any third-party widget.
Conclusion
To add a chatbot to WordPress, paste the ConvoRail script tag into a site-wide footer or header scripts field, using your theme's setting or a maintained plugin, and avoid editing parent theme files. Clear caches, test on several pages and on a phone, and check that the bot declines to guess and hands off to a person.
Key takeaways
- ConvoRail installs with one script tag, so WordPress setup is about placing it site-wide safely.
- Use a theme scripts field or a maintained header and footer plugin; avoid editing parent theme files.
- Do not alter the tag; the API key attribute must stay intact.
- Clear caches and exclude the script from optimisation plugins if the widget does not appear.
- Test on several pages, on mobile, and test both unknown questions and a human handoff.
Quick Summary
Adding a chatbot to WordPress takes one script tag placed site-wide. Paste the ConvoRail tag into your theme's footer scripts field or a maintained header and footer scripts plugin, avoid editing a parent theme's files, then clear caches and test on several pages, on mobile, with an unknown question and a human handoff. Plans, themes and hosts vary, so verify what your WordPress setup allows before you start.
Want to see grounded answers on your own site?
Start free, add your Q&A pairs and paste one script tag. No credit card required.

Founder & CEO
Writes about grounded AI chatbots for websites: how they work, how to measure them and what to check before you buy.
Topics
Get new posts by email
Guides on AI chatbots for websites, straight to your inbox.
