WordPress chatbot: how to add an AI chatbot to your site

How to add an AI chatbot to a WordPress site: plugin or code, what it should read, WooCommerce orders, speed, privacy and the checks to run before launch.

3 MIN READUPDATED 6 SECTIONS

WordPress runs roughly two in five websites, according to W3Techs, so “how do I add a chatbot to WordPress?” is one of the most common chatbot questions there is. The answer is straightforward, but the choice you make first, a plugin or a hosted chatbot, shapes everything after it.

Two ways to do it

An all-in-one plugin

You install a chatbot plugin from the WordPress plugin directory, connect it to an AI provider with an API key, and configure everything in your WordPress admin.

  • Good for: people who want everything inside WordPress and are comfortable managing an API key, usage costs and plugin updates.
  • Watch for: extra load on your server if the plugin indexes content or runs AI requests itself; you’re responsible for the AI provider’s bills and terms; handover to a person and a shared inbox are often basic or missing.

A hosted AI chatbot

You sign up with a chatbot provider, it reads your site from its own servers, and you add one line of code to WordPress, usually with a header and footer plugin.

  • Good for: businesses that want accurate answers, a team inbox, other channels (email, WhatsApp, Instagram) and minimal maintenance.
  • Watch for: monthly cost, where data is stored, and whether you can test changes before they go live.

For a business using the chatbot for customer service, a hosted chatbot is usually the better choice. For a hobby site or an experiment, a plugin is fine.

Adding a hosted chatbot to WordPress

  1. Copy the chat code from your chatbot provider.
  2. Install a header and footer plugin such as WPCode (Plugins → Add New Plugin).
  3. Paste the code into the footer box, so it loads just before </body> on every page.
  4. Clear your cache if you use a caching plugin or a CDN.
  5. Check it appears on a private browser window and on a phone.

If you manage your own theme, a child theme’s wp_footer hook works too. Avoid pasting code straight into a parent theme, where an update will remove it. On WordPress.com, adding plugins needs a paid plan.

What it should read

A WordPress chatbot is only as good as the content it answers from:

  • Pages and posts from your sitemap, re-read as you edit them.
  • WooCommerce products and policies, if you sell online.
  • PDFs and documents you upload: brochures, price lists, terms.
  • Short Q&As for things your site doesn’t say.

It should answer only from that content, show the source, and say when it doesn’t know. You’re responsible for what it tells customers, as Air Canada found when a tribunal held it to a policy its chatbot invented (American Bar Association).

WooCommerce stores

For shops, connect the chatbot to WooCommerce so it can check order status and tracking. Verification is essential: order number plus email, or a signed-in customer account, before revealing anything. Returns, stock questions and back-in-stock requests are the next jobs to automate.

Checks before launch

  • Speed. Run a page speed test before and after. The chat script should load asynchronously and not block the page.
  • Caching. Some caching and optimisation plugins combine or delay scripts. If the chat button doesn’t appear, exclude its script from optimisation.
  • Cookie consent. If the widget sets non-essential cookies or storage, make sure your consent banner covers it.
  • Accessibility. Keyboard, screen reader and contrast, following WCAG 2.2.
  • Disclosure. Say it’s AI. In the EU, Article 50 of the AI Act requires it unless it’s obvious.
  • Real questions. Ask it your last 20 customer questions, plus a few it shouldn’t answer.

How Dazza fits

Dazza is a hosted AI customer service agent. You add it to WordPress with one line in your footer, it reads your sitemap in the background (250 to 5,000 pages by plan) and keeps up as you publish, answers with sources, and hands over to your team’s inbox. The same agent also answers email, WhatsApp and Instagram. See AI chatbot for your website for how to choose between providers.

Questions people ask

How do I add an AI chatbot to WordPress?

Either install a chatbot plugin from the WordPress plugin directory and connect it to an AI provider, or sign up for a hosted AI chatbot and paste its line of code into your site’s footer with a header and footer plugin such as WPCode.

What is the best AI chatbot plugin for WordPress?

It depends on what you need. For customer service, prioritise answers grounded in your own pages with sources, easy handover to your team, WooCommerce order checks if you sell online, and low impact on page speed.

Will a chatbot slow down my WordPress site?

A well-built hosted chatbot loads its script asynchronously after the page, so the effect on load time is small. Plugins that run AI requests or large indexes on your own server can add load; check with a speed test before and after.

Can a WordPress chatbot check WooCommerce orders?

Yes, if it connects to WooCommerce, either through a plugin integration or an API or MCP connection. It should verify the customer first, with the order number and email or a signed-in account.

Sources

  1. W3Techs: Usage statistics and market share of WordPress
  2. EU AI Act, Article 50: transparency obligations (practical guide)
  3. W3C: Web Content Accessibility Guidelines (WCAG) 2.2
  4. American Bar Association: BC tribunal confirms companies remain liable for information provided by AI chatbot
Try Dazza on your own website: 14 days and 100 conversations, no card. Start for free ↗