---
title: "WordPress AI chatbot: how to add one — Dazza"
description: "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."
url: https://dazza.io/chatbots/wordpress
updated: 2026-11-17
---

# 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.

By [William Mattey](https://dazza.io/authors/william-mattey)Founder, Wall & Fifth

*3 min read · Updated 17 Nov 2026 · 6 sections*

## IN SHORT

- There are two routes: an all-in-one chatbot plugin that runs inside WordPress, or a hosted AI chatbot added with one line of code.
- Hosted chatbots keep the heavy work off your server and usually answer better; plugins keep everything in your admin.
- Whichever you choose, it should read your pages automatically, answer with sources and hand over to a person.
- Check speed, caching, cookie consent and mobile layout before launch.

WordPress runs roughly two in five websites, according to [W3Techs](https://w3techs.com/technologies/details/cm-wordpress), 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](https://www.americanbar.org/groups/business_law/resources/business-law-today/2024-february/bc-tribunal-confirms-companies-remain-liable-information-provided-ai-chatbot/)).

## 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](https://www.w3.org/TR/WCAG22/).
- **Disclosure.** Say it’s AI. In the EU, [Article 50 of the AI Act](https://artificialintelligenceact.eu/transparency-rules-article-50/) 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](https://dazza.io/help/install-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](https://dazza.io/chatbots/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](https://w3techs.com/technologies/details/cm-wordpress)
2. [EU AI Act, Article 50: transparency obligations (practical guide)](https://artificialintelligenceact.eu/transparency-rules-article-50/)
3. [W3C: Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/)
4. [American Bar Association: BC tribunal confirms companies remain liable for information provided by AI chatbot](https://www.americanbar.org/groups/business_law/resources/business-law-today/2024-february/bc-tribunal-confirms-companies-remain-liable-information-provided-ai-chatbot/)

## READ NEXT

- [**Customer service chatbots: the complete guide** What a customer service chatbot is, how AI chatbots differ from scripted ones, what they cost, how to choose one and how to set it up so customers trust it.](https://dazza.io/chatbots)
- [**AI chatbot for your website: how to choose one and add it** How to choose an AI chatbot for your website, what it should do, how it reads your pages, how to install it on WordPress, Shopify or Wix, and what it costs.](https://dazza.io/chatbots/website)
- [**How to build an AI chatbot: no-code and code, step by step** How to build an AI chatbot for your website or business: the no-code route in an afternoon, the developer route with retrieval and guardrails, and the costs.](https://dazza.io/chatbots/how-to-build)
- [**Knowledge** Dazza reads your website, documents and Q&As, then answers customers with a source for every reply. Your own answers win, and it says so when it doesn’t know.](https://dazza.io/product/knowledge)
- [**Types of chatbots: rule-based, AI, hybrid and agents explained** The main types of chatbots explained: rule-based, keyword, AI (generative), hybrid and AI agents, plus types by purpose and channel, with when to use each.](https://dazza.io/chatbots/types)
- [**Chatbot examples: 15 customer service conversations, good and bad** Fifteen AI chatbot examples for customer service, as sample conversations by industry, showing good answers, actions and handovers, and common failures.](https://dazza.io/chatbots/examples)

WRITTEN BY

[**William Mattey**](https://dazza.io/authors/william-mattey) · Founder, Wall & Fifth

William Mattey is the founder of Wall & Fifth, the London product design and development studio that makes Dazza, and leads the team building it.
