Skip to main content

WordPress Chatbot Plugin

Use the official ChattyBox WordPress plugin when you want a no-code installation that loads the hosted widget without editing theme files. This guide covers the operational setup. The WordPress AI chatbot page explains content and crawl strategy, while the WordPress plugin landing page covers the product at a glance.

Before Installing

Complete the Getting Started flow first: connect your public WordPress URL, review indexed pages, and verify representative answers in Test Chat. Then create a browser-safe public key in Public Keys and copy it from the project Embed tab.

Install the Plugin

The plugin has no Composer, npm, or build-step dependency. It is currently distributed from the public ChattyBox GitHub repository, not the WordPress.org Plugin Directory, so use WordPress's Upload Plugin flow rather than directory search. Directory-managed automatic updates are not available yet.

The pinned 0.2.0 package declares WordPress 5.8+ and PHP 7.4+, with testing metadata up to WordPress 6.8. Test your actual WordPress/PHP versions and theme; that metadata is not a guarantee for every newer release.

  1. Download the pinned ChattyBox WordPress plugin 0.2.0 ZIP, or inspect the public source repository.
  2. In WordPress, open Plugins > Add New > Upload Plugin, upload the ZIP, and activate ChattyBox AI Chatbot. For a manual server install, copy the plugin directory into wp-content/plugins/ first.
  3. Open Settings > ChattyBox.
  4. Paste the public widget API key from the project Embed tab.
  5. Enable the chatbot and save the settings.

The plugin stores the public widget key and display settings in WordPress options. Never paste a ChattyBox management credential into the plugin.

Configure Loading

The production defaults are:

  • Widget script: https://chattybox.ai/widget.js
  • API endpoint: configured automatically by the plugin
  • Enabled: off until you enable the chatbot with a nonempty public key
  • Locale override: blank; the hosted widget follows the project's locale policy (auto mode by default)

With auto mode, page <html lang> takes priority over browser language. Fixed mode uses the project's default locale. The plugin's optional language override becomes data-locale and wins only when the project permits script overrides. Use a supported lowercase locale code; custom header/welcome text is not automatically translated.

The API endpoint is built into this plugin version, not discovered from the key. Changing Widget script URL does not change that endpoint. If the Embed snippet targets a different API deployment, use the manual script integration instead. Remote loader URLs must use HTTPS (HTTP is permitted only for local development hosts).

The plugin loads the widget on public frontend requests. It intentionally skips wp-admin, feeds, REST requests, and AJAX requests, so administrative and non-page responses do not receive the script.

These request guards do not test every frontend page's privacy or membership status. Checkout, account, password-protected, and membership pages need explicit exclusions where appropriate. Also confirm the theme outputs WordPress's footer scripts. The plugin does not crawl or sync posts; content indexing and refreshes happen in ChattyBox.

Public keys work across browser origins by default. Optional restrictions in Public Keys > Edit origins require each intended scheme, hostname, and port; blocked or missing request origins return 401 Invalid API key. Test the production page, not just the dashboard.

Exclude Additional Routes

Use the chattybox_load_widget filter from a site-specific plugin or child theme when a public route should not show the widget:

add_filter(
'chattybox_load_widget',
static function ( $should_load ) {
return $should_load && ! is_page( array( 'checkout', 'account' ) );
}
);

Keep the default plugin behavior enabled first, then add only the route exclusions your site needs. Test both an excluded route and a normal public page after changing the filter.

Manual Script Fallback

Use the plugin as the default path. If your WordPress team already manages scripts through a theme, child theme, script plugin, or Google Tag Manager, you can load the hosted widget manually instead:

<script
src="https://chattybox.ai/widget.js"
data-api-key="YOUR_API_KEY"
data-api-url="YOUR_WIDGET_API_URL"
async
></script>

Do not enable the plugin and add the same widget snippet at the same time. Choose one loader so visitors do not receive duplicate launchers.

Verify the Installation

After configuring the plugin:

  • Open a public WordPress page in an incognito window.
  • Confirm the launcher appears once.
  • Ask a real visitor question.
  • Verify a supported answer cites indexed public WordPress pages and an unsupported question shows the fallback, which can have no sources.
  • Check the browser console for missing data-api-key, data-api-url, or key errors.
  • Test a checkout, account, or private route if you configured an exclusion.
  • Purge any relevant WordPress/CDN page cache after changing settings or exclusions, and test a fresh page load. Neither removing a script nor hiding the widget with CSS is complete UI teardown or consent revocation.

Continue with the launch checklist before announcing the chatbot. Use Analytics and Content Gaps to improve the WordPress content after real questions arrive.

We use optional analytics and tag-management tools to understand site use. Choose whether to allow Ahrefs Web Analytics, PostHog, and Google Tag Manager. Turning analytics off reloads this page so the change takes effect cleanly. Essential site functionality and error monitoring are not controlled by this choice. Read our privacy policy.