WordPress AI chatbot: how to add one to WordPress.org or WordPress.com
A WordPress AI chatbot doesn't have to run inside WordPress. Life Inside's AI Chat Agent runs on Life Inside's EU-hosted service, and your site only loads one script in the footer of every page. Conversations are not stored in your WordPress database.
This guide covers self-hosted WordPress.org and WordPress.com, which have different rules for code. For other platforms, see all install guides. If you would rather do it together, book a demo.
What you need
- WordPress.org (self-hosted): an administrator account that can install plugins. If a developer manages your theme, a child theme works too.
- WordPress.com: a Personal, Premium, Business or Commerce plan with hosting features activated. Free sites cannot add JavaScript.
- Your Life Inside snippet with your own widget ID, sent by Life Inside when your agent is set up.
- A Life Inside AI Agent plan. See the pricing page.
Add the Life Inside snippet to WordPress
Your snippet, with your own widget ID, comes from Life Inside when your agent is set up. It looks like this:
<script>
(function () {
var s = document.createElement("script");
s.src = "https://widget.lifeinside.io/loader/latest/widget";
s.charset = "UTF-8";
s.async = true;
s.onload = function () {
WidgetWrapper.mount({ id: "YOUR_WIDGET_ID" });
};
document.body.appendChild(s);
})();
</script>- In your WordPress dashboard, go to Plugins and install and activate the free WPCode plugin (Insert Headers and Footers by WPCode).
- Go to Code Snippets > Header & Footer.
- Paste the Life Inside snippet into the Footer box.
- Click Save Changes.
- If a caching plugin or your host caches pages, clear the cache so visitors get the updated pages.
Add chatbot to WordPress: plugin or theme?
There are two sound ways to get the snippet onto every page. Both end up in the same place: the footer, just before the closing body tag, which is where the snippet needs to run because it adds the widget to the page body.
- A header and footer plugin such as WPCode. The quickest route and the one WordPress.com documents. The plugin outputs your code through WordPress's footer hook, which themes call just before the closing body tag, so it does not depend on which theme you use, and theme updates leave it alone.
- Your theme. If a developer looks after your site, they can add the snippet through the footer hook in a child theme. Avoid pasting it straight into the parent theme's files: WordPress's own theme handbook warns that changes made that way disappear when the theme updates.
WordPress.com: which plans allow a chatbot
WordPress.com limits code on free sites for security, and script tags are on the list of things free sites cannot use. On the Personal, Premium, Business and Commerce plans you can install plugins, and WordPress.com's own guide to adding code to headers and footers uses the same WPCode plugin as above.
One extra step on WordPress.com: a paid plan has to have its hosting features activated before plugins and scripts work. Installing your first plugin activates them, and Commerce sites are activated automatically. When that happens, the default site address changes from a wordpress.com address to a wpcomstaging.com one, and the old address redirects.
What a WordPress chatbot does on your site
WordPress runs every kind of site, from company websites and recruitment portals to member organisations and municipalities. What they share is a lot of content, and visitors who cannot find the one page that answers their question.
The agent answers from the pages, documents and FAQs you approve, so a PDF policy or an old news post becomes something visitors can ask about. When it does not know, it says so and points to the right contact, and the gap shows up in AgentLoop. For a content team that is a weekly list of pages to write or fix.
- Customer service: answer the questions your inbox sees every week. See customer service.
- Recruitment: send candidates to the right job and answer what applicants ask, as Avarn Security does with its AI career guide.
- Public sector: answers in more than 60 languages, in the language the visitor writes in. See public sector.
Show the chatbot on some pages only
If you do not want the agent everywhere, skip the site-wide Footer box and add the snippet to the pages you choose with a Custom HTML block in the editor. On WordPress.com this also needs a plugin-enabled plan with hosting features activated, as script tags in a Custom HTML block are not allowed on free sites.
Check that it works
- Open your site in a private browser window, so you see what a visitor sees rather than a logged-in or cached version.
- Look for the Life Inside widget in a bottom corner of the page.
- Ask a question your site answers, then one it should not know, and check that the second answer points to the right contact.
- Confirm the conversation shows up in AgentLoop.
Frequently asked questions
Sources
- WordPress.com Support: Add code to headers (Checked 2026-10-27)
- WordPress.com Support: Add code to your site (Checked 2026-10-27)
- WordPress.com Support: Plugins (Checked 2026-10-27)
- WordPress.com Support: Activate your plan (Checked 2026-10-27)
- WordPress.org Plugin Directory: WPCode, Insert Headers and Footers (Checked 2026-10-27)
- WordPress Developer Resources: wp_footer() (Checked 2026-10-27)
- WordPress Theme Handbook: Child themes (Checked 2026-10-27)
Updated 2026-10-27