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.

Can I use ChattyBox on WordPress without branding?​

Yes. The official plugin loads the hosted ChattyBox widget on your WordPress site. Free keeps the “Powered by ChattyBox” footer. Starter, Pro, and Business can remove it under Customize → ChattyBox branding by turning off Show ChattyBox branding. See widget customization for the setting and pricing for the plans.

Before Installing​

Complete the Getting Started flow first: connect your public WordPress URL, review indexed pages, and verify representative answers in Test chatbot. Under Install → Keys & domains, inspect or create a public widget key and check its origin settings. Under Install → Website installation, select a suitable key and copy it from the installation snippet.

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 installation snippet.
  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)

In current hosted-widget source, auto mode tries a supported page <html lang> first, then supported browser languages, the configured default, and English. 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. Check the separately deployed loader version when relying on this behavior.

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 website installation 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 registers the widget on WordPress frontend enqueue requests and explicitly skips feeds, REST requests, and AJAX requests. These guards do not inspect every response type or establish that every frontend page is public.

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.

Keys created without restrictions work across browser origins; a key prepared for a website can already be restricted to that site's origin. Optional restrictions in Install → Keys & domains require each intended scheme, hostname, and port. For restricted keys, a missing or disallowed effective request origin returns 401 Invalid API key; when the Origin header is absent, the server can derive the origin from a valid Referer. Origin restrictions are additional hardening, not visitor authentication. 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. Server-side exclusions do not remove a widget already initialized during client-side navigation. On sensitive routes or consent revocation, actively tear it down using an integration supported by the deployed loader; neither removing a script nor hiding the widget with CSS is complete teardown. Teardown cannot undo requests already processed by the server.
  • The automatic plugin loader does not check visitor consent before enqueueing the widget. If consent is required, use an integration that prevents loading until consent is granted, and verify revocation behavior with the deployed loader.

Continue with the launch checklist before announcing the chatbot. Use Conversations → History, available on every plan, to review conversations. On Pro or Business, use Conversations → Analytics and Conversations → Unanswered questions to review areas for improvement after real questions arrive.