Skip to main content
Security notice: The Life Inside platform is not affected by the PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619. No action is required for your use of Life Inside. Assessed 23 October 2026. Questions: legal@lifeinside.io

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>
  1. In your WordPress dashboard, go to Plugins and install and activate the free WPCode plugin (Insert Headers and Footers by WPCode).
  2. Go to Code Snippets > Header & Footer.
  3. Paste the Life Inside snippet into the Footer box.
  4. Click Save Changes.
  5. 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

  1. Open your site in a private browser window, so you see what a visitor sees rather than a logged-in or cached version.
  2. Look for the Life Inside widget in a bottom corner of the page.
  3. Ask a question your site answers, then one it should not know, and check that the second answer points to the right contact.
  4. Confirm the conversation shows up in AgentLoop.

Frequently asked questions

No. Life Inside installs with one snippet in your site footer, added with a header and footer plugin such as WPCode or through your theme. The agent itself runs on Life Inside, not in WordPress.

With the plugin route, yes. The plugin adds the snippet through WordPress's footer hook, which themes call just before the closing body tag, so the result does not depend on a particular theme.

No. WordPress.com does not allow script tags on free sites. You need a Personal, Premium, Business or Commerce plan with hosting features activated.

The agent does not run on your server or add database tables. The snippet loads the widget script asynchronously in the visitor's browser, so the page keeps loading while the widget loads.

No. The Life Inside website widget sets no cookies. Conversations are hosted in the EU, encrypted at rest and in transit, and covered by a data processing agreement.

Yes, if you approve them. The agent answers only from content you approve, such as your website, documents and FAQs. Life Inside builds the knowledge base with you, and most agents go live within a day.

Life Inside is not a live chat inbox. When a question needs a human, the agent points the visitor to the right contact or booking link instead of guessing.

Sources

Updated 2026-10-27