How to Add an AI Chatbot to WordPress (No Coding)
You don’t need a WordPress chatbot plugin to put an AI chatbot on WordPress. A hosted chatbot trained on your site installs with one line of script, which WordPress can take in three ways depending on your theme. The whole thing takes about 15 minutes.
The quick answer: create the bot in CarlyChat, point it at your site so it learns your pages, test the answers, then paste its one-line script into your site’s footer with the free WPCode plugin (or your theme’s footer). CarlyChat is free to start, needs no OpenAI key, and shows you the source of every answer before you go live.
1. Create the chatbot and train it on your site
Sign up at carlychat.com and create a chatbot. Give it your WordPress site’s address and it crawls your pages: services, FAQs, policies, blog posts, product pages. Then add whatever isn’t on the site yet:
- Files your team already answers from, like a price sheet or onboarding PDF
- Text for anything unpublished
- Exact question-and-answer pairs for the answers you can’t afford to have paraphrased: refunds, hours, service area, pricing
2. Test the answers before anyone sees them
Open the playground and ask what customers actually ask, in the way they ask it: “how much”, “do you deliver to Austin”, “can I cancel”. Every answer shows the source it came from, so when one is wrong you can see it pulled from an old page and go fix the page.
3. Set instructions, branding, and lead capture
Tell the bot how to sound and what not to do (“never promise a delivery date”), set your brand color so the widget matches your theme, and choose:
- Lead capture, to collect a name and email when a visitor is ready to buy
- Human takeover, so a visitor who asks for a person (or sounds frustrated) gets one, with an email alert to your team and replies inside the same chat
- Which pages and domains the widget shows on
If you sell with WooCommerce or keep customers in a CRM, CarlyChat’s actions can run a live lookup (like an order status) and its presets sync conversations and leads to HubSpot, Attio, or Carly CRM.
4. Copy the install script
In CarlyChat, copy the widget’s one-line script. It’s the same line for any site; only where you paste it changes.
5. Add the script to WordPress
Pick the method that matches your setup. All three add the chatbot to every page.
Option A: a header-and-footer plugin (any theme, easiest)
- In WordPress, go to Plugins → Add New, search for WPCode, then install and activate it.
- Go to Code Snippets → Header & Footer.
- Paste the script into the Footer box and click Save Changes.
This survives theme changes and updates, which is why it’s the method to use if you’re not sure.
Option B: a block theme’s Footer template part
On block themes like Twenty Twenty-Four or Twenty Twenty-Five:
- Go to Appearance → Editor → Patterns, and open the Footer template part.
- Add a Custom HTML block and paste the script.
- Click Save.
Because the footer appears on every page, so does the chatbot.
Option C: a classic theme’s footer.php
- Go to Appearance → Theme File Editor and open footer.php.
- Paste the script just before the closing
</body>tag and click Update File.
Do this in a child theme. A theme update overwrites footer.php in the parent theme and your chatbot disappears with it.
Only want it on one page? Add a Custom HTML block with the script to that page alone.
On WordPress.com? Adding scripts and plugins needs a plan that supports plugins. On the lower plans, the editor strips script tags.
6. Clear your cache and check the live site
Caching and optimization plugins can serve the old page or delay scripts. Clear the cache, open your site in a private window, and look for the chat bubble in the lower corner. Ask it something you tested in the playground. If the bubble doesn’t appear, exclude the CarlyChat script from your plugin’s “delay JavaScript” setting.
Have your AI agent do it
CarlyChat has a remote MCP server that works in Claude, ChatGPT, Claude Code, Codex, and Cursor. Give your agent one instruction:
Read https://carlychat.com/llms.txt, connect to CarlyChat, then create, train, and install a support chatbot for example.com. Only ask me for what you can’t do yourself.
It creates the bot, crawls your site, sets the instructions, brand color, and lead capture, and hands you the script for step 5. If it also has access to your WordPress site, it can add the script too. After launch, the same connection lets it search conversations, pull leads, and read analytics to find the questions your bot still misses.
Plugin chatbot or hosted chatbot?
WordPress chatbot plugins run inside your site. Some are full chat products with their own dashboards; others are AI plugins that use your own OpenAI API key, so you pay for every message on your OpenAI bill and manage the plugin’s updates.
A hosted chatbot like CarlyChat runs outside WordPress. There’s no AI key to manage, nothing extra in your WordPress admin, and the same bot can run on a second site, a hosted chat page, or your app through its REST endpoint, all answering from the same sources. For most small business sites, that’s less to maintain.
Common questions
Do I need a plugin to add a chatbot to WordPress? No. You need somewhere to paste one line of script. A header-and-footer plugin like WPCode is the easiest place, but a block theme’s footer or a child theme’s footer.php works too.
Will a chatbot slow down my WordPress site? A single script added to the footer loads after your page content. If you use an optimization plugin, let it delay the script rather than block it.
Can the chatbot answer from my WordPress content? Yes. CarlyChat crawls your site’s pages and answers from them, and the playground shows which page each answer came from.
Can it hand off to a person? Yes. With human takeover on, the AI stops when a visitor asks for someone, and your team replies inside the same chat.
Related: how to add a chat widget to your website, best AI chat widgets, Chatbase alternatives, and no-code chatbot builder.
Put a support chatbot on your site today
Train it on your pages and documents, check every answer and its source, then add it with one line of code. No AI key needed.
Get startedSee the prompt
Read https://carlychat.com/llms.txt and follow it to connect to CarlyChat at https://carlychat.com/mcp, signing up yourself if you need to. Then create, train, and install a support chatbot for <your website URL>. Only ask me for what you can't do yourself.


