GUIDE
Adding an AI chatbot to WordPress, plugin or script tag?
The two ways into a WordPress site, which one survives a theme change, and the one line most sites need.
Published
A WordPress site can take a chat widget two ways. One is a plugin from the directory. The other is the vendor’s script tag, pasted into a settings box.
Most sites should take the second one. It is one line, it lives in your site’s own settings rather than inside a theme, and it survives your next redesign.
The line in this guide is Deacon’s. Deacon is our own AI customer support agent, and it answers from the help pages already on your site. The free plan takes no card.
A plugin from the directory
If whoever you are buying from publishes a WordPress plugin, this is the shortest path. Install it, connect your account, and the settings live in WordPress rather than in somebody else’s dashboard.
Look at when it was last updated, and against which WordPress version it was tested. Look at the install count too, because a low one usually means a small project with one maintainer. Then find out whether it does anything beyond adding the widget, since a plugin that also writes to your database is one more thing to check at every WordPress upgrade.
A chat plugin that only injects a script tag is doing a job you can do yourself in one line. Check that before you add another plugin to your update queue.
A script tag
Every vendor gives you a line of HTML that looks about like this one.
<script src="https://heydeacon.com/widget/v1/loader.js" data-key="pk_your_widget_key" async></script>
It goes before the closing </body> tag, on every page. On WordPress there are three places you could put it, and only one of them is a good idea.
Do not paste it into your theme
If your host allows it, you can open Appearance, Theme File Editor and paste the tag into footer.php. Many managed hosts switch that editor off, and a block theme has no footer.php to edit at all.
Where it is available it works today, and then a theme update or a theme switch takes your edit with it. Nothing warns you when it goes. You find out when somebody mentions the chat button has disappeared.
A child theme survives a parent theme update but not a switch to a different theme, and it is more setup than the option below.
Use a header-and-footer plugin
This is the route we document, and it is one small plugin whose only job is to hold code that belongs in your header or footer. Paste the tag into the footer box, save, and it is on every page the theme renders.
It survives theme updates, theme switches and most redesigns, because the tag lives in your site’s own settings rather than inside a theme’s files. It also keeps all your third-party tags in one place, so you have somewhere to look when you are working out what is slowing the site down.
On a block theme this is the route that works. You can also add the tag to the footer template part in the Site Editor as a custom HTML block, though you are then editing a template that a theme update can replace.
Try Deacon for free
Install DeaconOn WordPress.com
WordPress.com filters the HTML you save, and on its free plan a <script> tag is one of the things it removes. Paste the tag into a Custom HTML block, press save, and it is gone. WordPress.com’s own Custom HTML block page lists the plan as the first thing to check when code disappears.
Every paid plan can install plugins, Personal included, but WordPress.com says a paid plan alone is not enough. The plan’s hosting features have to be active too, and installing a plugin is one way to activate them. Its guide to adding code to a header names the plugin to use, the free Insert Headers and Footers by WPCode, so installing it activates the plan and gives the tag a footer box in one go. The box is under Code Snippets, then Header & Footer. WordPress.com last reviewed these pages in August 2026.
You do not need a developer for this
There is no staging site to set up and nothing to rebuild. It is one line, pasted once, and nothing about your theme, your page builder or your caching plugin changes because of it. The tag loads in the background and never blocks the page.
If you run a caching plugin, clear the cache after you save, or you will spend ten minutes looking at a copy of the page from before you added it.
Adding Deacon to WordPress
Deacon is the one-line route. You paste one line into your footer settings and it is live on every page of your site, with no Deacon plugin to install, update or check after a WordPress release.
Everything after that happens in the dashboard. Point Deacon at your site and it lists the pages it finds, each switched off until you tick it. WordPress also makes a page for every category, tag, author and month you have posted in, so leave those archive pages unticked and keep the ones that answer questions. Deacon then answers from them with a link back to the page it used.
When your help pages do not cover something, Deacon says so and asks for an email address, and the question turns up in your dashboard with the whole conversation attached.
The free plan is 50 answers a month on one seat, with no card and no time limit, and the pricing page has the rest. The install guide covers the dashboard side, and the three ways in covers this choice for platforms other than WordPress.
What to check after you save
Open a page of your site in a private window and look for the button. The private window matters, because your own browser is probably holding a copy of the page from before you saved.
Then check your dashboard says the widget has been seen on your real domain rather than on localhost. Deacon shows you the origin and how long ago it was last seen.
Then ask it a question you know your help pages answer, and one you know they do not.
Try it on your own documentation
Add your help pages, ask it the question you know your docs cannot answer, and watch it say so.
The free plan covers 50 answers a month on one seat, and the paid plans are on the pricing page.
Free plan, no card.
READ NEXT
How to add an AI chatbot to your website, three ways, with the code
A plugin, a script tag or your own build. What each one asks of you, what it can and cannot do, and the code for the one most sites should use.
Point an AI chatbot at your documentation and have it stay honest
What happens between adding your help pages and a visitor getting an answer with a link to the page it came from, and where it can go wrong.
How to use Deacon
Install Deacon with one snippet, style the button and window, build its knowledge base, open it from your own button, and handle what it can’t answer.