> ## Documentation Index
> Fetch the complete documentation index at: https://chatbase.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add an AI agent to your WordPress site

> Add your Chatbase AI agent to a WordPress website using the official Chatbase plugin and your Agent ID

The official Chatbase plugin for WordPress adds your AI agent to a WordPress site as a floating Chat Bubble. Instead of pasting an embed script into your theme, you install the plugin and give it your Agent ID. WordPress is included on every Chatbase plan.

> [card] What you can do:
>
> Put your AI agent in front of every visitor to your WordPress site, with no theme code to edit.

## Before you start

* A Chatbase account with an AI agent, and [the AI agent enabled](https://chatbase.co/docs/user-guides/quick-start/your-first-agent.md#navigate-to-the-channels-section). If you don't have an account, [sign up and start a 7-day free trial](https://www.chatbase.co/auth/signup); if you're not sure how to build an AI agent, see [Your first AI agent](https://chatbase.co/docs/user-guides/quick-start/your-first-agent.md).
* A WordPress site where you can install plugins, and access to your admin dashboard.

## How to add your AI agent

**1. Log in to your WordPress admin dashboard**

Your dashboard URL is typically *yourdomainname.com/wp-admin/*. You can also reach it through your web hosting control panel.

**2. Install and activate the Chatbase plugin**

In the left sidebar of your WordPress admin dashboard, click **Plugins**.

![The Plugins item in the WordPress admin sidebar](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/wordpress/wordpress-1.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=6049a461b8a99783b6b6d527a2e6ab71)

Click **Add New Plugin** at the top of the next page.

![The Add New Plugin button in WordPress](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/wordpress/wordpress-2.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=8abec164b93bfaff6308ab52245348cd)

In the search bar, type **Chatbase**. Find the Chatbase WordPress plugin, click **Install Now**, then **Activate**.

![Installing the Chatbase plugin from the WordPress plugin directory](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/wordpress/wordpress-3.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=5c73c36d12ce8dfe9a040aefd006c63b)

**3. Open the Chatbase plugin settings**

1. In the left sidebar of the WordPress admin dashboard, click **Settings**.
2. Look for **Chatbase options** and click it.
3. Find the text box labeled **Agent ID**.

![The Agent ID field in the Chatbase WordPress plugin settings](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/wordpress/wordpress-4.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=3174da4eef42c8d45ea4eb2809413763)

**4. Copy and paste your Agent ID**

1. Go to your Chatbase [dashboard](https://www.chatbase.co/dashboard/) and select the AI agent you want to embed.
2. Click **Settings** in the sidebar and stay on the **General** tab. Copy the **Agent ID** from the **Agent details** card.
3. Paste the Agent ID into the text box in your WordPress settings.

![Locating the Agent ID in the Chatbase dashboard](https://mintcdn.com/chatbase/qI0LQ6QhbuUlH68f/user-guides/integrations/images/Integrations/Agent-ID.png?fit=max\&auto=format\&n=qI0LQ6QhbuUlH68f\&q=85\&s=6707c1fc504200328f83e77dfebfbfd0)

**5. Save your changes**

Click **Save Changes**.

> [!TIP]
>
> Visit your WordPress site and confirm the Chatbase AI agent appears and responds.

![The Chatbase AI agent live on a WordPress website](https://mintcdn.com/chatbase/JnjROJ-aB2q57UGe/user-guides/integrations/images/wordpress/wordpress-6.webp?fit=max\&auto=format\&n=JnjROJ-aB2q57UGe\&q=85\&s=a60cc6a7d4f22d10645b9e04a828b10a)

## If you use Specific domains

If you turned on **Only allow embedding the agent on specific domains** in the **Specific domains** card of the **Deploy** sheet, add every address your WordPress site runs on, such as `https://www.acme.com` and a staging address like `https://staging.acme.com` (example values). Each entry matches one exact host, paths are ignored, and an entry without `https://` or `http://` matches only https pages. For a local install, add the full address with its port, such as `http://localhost:8080`. See [Deploy button](https://chatbase.co/docs/user-guides/chatbot/channels.md#deploy-button).

## Troubleshooting

> [accordion] The Chat Bubble doesn't appear after saving the Agent ID
>
> **Possible causes:**
>
> * A caching or optimization plugin (for example, one that delays, defers, combines, or self-hosts JavaScript) changed how the Chatbase script loads.
> * **Specific domains** is on and the site's address isn't listed. The browser console shows a message starting with `[Chatbase] Agent` that says the agent is not allowed on that origin.
> * The visitor's country is in your [blocked countries](https://chatbase.co/docs/user-guides/chatbot/guardrails.md#blocking-a-country).
>
> **Solution:** clear your caching plugin's cache, check the setting that applies, and reload the page in a private window.

> [accordion] My caching plugin breaks the Chat Bubble
>
> The Chat Bubble loads from a short inline script that fetches `embed.min.js` from chatbase.co after the page loads, and it works out where to open the chat from that file's address. If your caching plugin optimizes JavaScript, exclude the Chatbase inline script and `chatbase.co/embed.min.js` from its delay, defer, combine, minify, and "host scripts locally" features. A copy of `embed.min.js` served from your own domain won't load the chat correctly.

> [!NOTE]
>
> You can customize the appearance and colors of your AI agent on your Chatbase dashboard. Go to your **dashboard**, choose an AI agent, click **Channels** in the left sidebar, click **Manage** on the **Chat Bubble** card, then open the **Display** tab to edit Content, Capabilities, Colors, Floating bubble, and Localization.

## Frequently asked questions

> [accordion] Is the Chatbase WordPress plugin free?
>
> Yes. The plugin is free to install, and the WordPress channel is part of every Chatbase plan. To hide "Powered by Chatbase" in the chat, add the **Remove 'Powered By Chatbase'** add-on, see [Add Ons](https://chatbase.co/docs/user-guides/workspace/settings.md#add-ons).

> [accordion] Can I add Chatbase to WordPress without the plugin?
>
> Yes. Copy the **Website widget** script from **Deploy** in your Chatbase dashboard and output it unchanged in your site footer on every page, for example with a code snippets plugin such as WPCode or in your theme's footer template. Chatbase doesn't depend on how the script reaches the page.

> [accordion] Can I show the Chat Bubble on some pages only?
>
> Instead of the plugin, add the **Website widget** script only to the pages where the Chat Bubble should appear.

> [accordion] What does the Chat Bubble look like on phones?
>
> Below 640px wide, the chat opens full screen and the page behind it stops scrolling while it's open. On wider screens it opens as a panel 406px wide in the bottom corner.

> [accordion] Can I change where the Chat Bubble sits?
>
> Switch it between the bottom left and bottom right with **Position** in **Display > Floating bubble**. There is no offset setting. See [Floating bubble](https://chatbase.co/docs/user-guides/chatbot/channels.md#floating-bubble).

## Next steps

> [card] [Customize the Chat Bubble](https://chatbase.co/docs/user-guides/chatbot/channels.md#chat-bubble-display)
>
> Match the widget to your brand colors, position, and copy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.