ChatonboChatonbo
Solutions
TemplatesTry ItUse CasesPricingCompareIntegrationsDocsBlog
LoginSign Up Free
BlogBest Practices
Best PracticesJanuary 19, 20264 min readLast updated: September 11, 2026

How to Add an AI Chatbot to Your WordPress Site in 2 Minutes

EK
Elena Kowalski
Head of Customer Success
How to Add an AI Chatbot to Your WordPress Site in 2 Minutes

On this page

Method 1: Theme Header/Footer (Recommended)Method 2: Page BuildersTroubleshootingFAQ

TL;DR: To add an AI chatbot to WordPress in about 2 minutes, copy your bot's embed code and paste it before the closing body tag in footer.php, or use the Insert Headers and Footers plugin so you never touch theme files. Elementor, Divi, and Gutenberg each have an HTML block for the same snippet. Clear your caching plugin and CDN afterwards, then verify in an incognito window.

WordPress powers over 40% of websites worldwide, making it the most common platform for AI chatbot deployment. Here's exactly how to add an AI chatbot to your WordPress site.

Method 1: Theme Header/Footer (Recommended)

This is the simplest method and works with every WordPress theme.

Step 1: Get Your Embed Code

Log into your chatbot platform dashboard and navigate to your bot's "Install" tab. Copy the embed code - it looks something like this:

<script src="https://chatonbo.com/widget/chatonbo-widget.js"
        data-bot-id="your-bot-id"
        data-api-url="https://chatonbo.com/api">
</script>

Step 2: Add to WordPress

Go to Appearance → Theme File Editor (or Appearance → Theme Header/Footer if your theme supports it).

Find the footer.php file and paste the embed code just before the closing tag.

Alternatively, use a plugin like Insert Headers and Footers (by WPBeginner) to add the code without editing theme files directly.

Step 3: Clear Cache

If you're using a caching plugin (WP Super Cache, W3 Total Cache, LiteSpeed Cache, WP Rocket), clear your cache so the new code takes effect. Also clear any CDN cache (Cloudflare, etc.).

Step 4: Verify

Visit your website in an incognito/private window. The chatbot widget should appear in the bottom-right corner.

Method 2: Page Builders

Elementor

Add an HTML widget to your site's footer template. Paste the embed code.

Divi

Use the Code Module in your footer section. Paste the embed code.

Gutenberg

Add a Custom HTML block in your site's footer pattern. Paste the embed code.

Troubleshooting

Chatbot doesn't appear

  • Clear your browser cache and WordPress cache
  • Check if any minification/optimization plugins are blocking the script
  • Verify the embed code is placed before , not inside

Chatbot appears on admin pages

  • The script loads on all pages. If you only want it on the frontend, wrap it in a condition or use a plugin that supports conditional loading.

Performance concerns

The chatbot script is lightweight (under 30KB gzipped) and loads asynchronously. It won't affect your Core Web Vitals or page load speed.

Caching issues after updates

When the chatbot widget is updated, WordPress caching plugins may serve the old version. Add a version parameter to bust the cache, or configure your caching plugin to exclude the chatbot script from minification.

Looking for the best AI chatbot for your WordPress site? See our AI chatbot for WordPress solution for lead capture, support automation, and more.

FAQ

How do I add an AI chatbot to a WordPress site?

Copy the embed code from your chatbot dashboard, then paste it just before the closing body tag in footer.php via Appearance, Theme File Editor, or use a plugin like Insert Headers and Footers to add it without editing theme files. Clear your cache and verify in an incognito window.

How do I add a chatbot in Elementor, Divi, or Gutenberg?

In Elementor, add an HTML widget to your footer template; in Divi, use the Code Module in your footer section; in Gutenberg, add a Custom HTML block to your site's footer pattern. Paste the same embed code in each case.

Why does my WordPress chatbot not show up?

Usually caching: clear your browser cache and any WordPress caching plugin such as WP Rocket or LiteSpeed Cache, plus your CDN. Also check that a minification or optimization plugin is not blocking the script and that the code sits before the closing body tag, not inside the head.

EK

Written by

Elena Kowalski

Head of Customer Success · Chatonbo

Customer Success lead. Turns chatbot deployments into measurable business outcomes.

No signup required

See it work on your own website

Paste your URL and chat with an AI agent trained on your content - right now, in 60 seconds.

Try It on Your Website

Ready to try it yourself?

Deploy an AI chatbot on your website in 2-3 minutes.

Get Started for Free

Related articles

Reducing Hallucinations in AI Chatbots: A Practical Guide
April 22, 2026

Reducing Hallucinations in AI Chatbots: A Practical Guide

Why AI chatbots make things up, when it actually matters for your business, and the concrete techniques that cut hallucinations to a negligible level - without the hype.

Free AI Chatbot for Your Website: Complete Setup Guide
April 7, 2026

Free AI Chatbot for Your Website: Complete Setup Guide

Learn how to add a free AI chatbot to your website in 2-3 minutes. Step-by-step tutorial with screenshots - no coding required, free trial to start.

How to Build the Perfect Knowledge Base for Your AI Chatbot
February 10, 2026

How to Build the Perfect Knowledge Base for Your AI Chatbot

Your AI chatbot is only as good as the knowledge you give it. Here's a step-by-step guide to building a knowledge base that delivers accurate, helpful responses.

ChatonboChatonbo

AI-powered chatbot platform for sales, support, and lead capture.

© 2026 Chatonbo. All rights reserved.

Product

  • How It Works
  • Pricing
  • Lead CRM
  • Integrations
  • Documentation
  • Templates
  • Compare
  • Alternatives
  • Head-to-head comparisons
  • Research
  • Customers
  • AI Visibility Checker
  • Blog

Solutions

  • Sales Agent
  • Support Agent
  • Shopify Agent
  • WooCommerce Agent
  • Wix Agent
  • Webflow Agent
  • BigCommerce Agent
  • Squarespace Agent
  • E-commerce Agent
  • Lead Generation Agent
  • All Industries
  • Small Business
  • Lead Capture
  • Real Estate
  • Healthcare
  • Restaurants
  • Legal
  • Education

Guides

  • Zapier Integration
  • Webhook Setup
  • WordPress Install
  • Shopify Install
  • Wix Install
  • HubSpot CRM
  • Slack Notifications
  • Zendesk Escalation
  • Zoho CRM
  • Google Analytics

Company

  • About
  • Contact
  • Help Center
  • Privacy Policy
  • Terms of Service
  • Affiliate Program
  • Chatbot Development Services
  • Authors
LanguagesEnglishEspañolPortuguêsFrançaisDeutschעברית