How to add an AI chatbot to your WordPress site
You don't need a dedicated chatbot plugin. Train the chatbot on your pages and documents in AgenBase, then paste one line of code into your site footer with a free code plugin like WPCode. It works with any theme, including block themes, Elementor and Divi.
About 10 minutes · No coding beyond pasting one line
Step by step
- 1
Create your chatbot
Sign up to AgenBase, add your website address or upload your documents, and test the answers in the playground. Then click Go live.
- 2
Copy your snippet
On the chatbot's Install tab, copy the script tag. It's one line.
- 3
Install a code plugin
In your WordPress admin, go to Plugins → Add New, search for “WPCode”, then install and activate it. Any header and footer plugin works the same way.
- 4
Create a new snippet
Go to Code Snippets → + Add Snippet, choose “Add Your Custom Code (New Snippet)”, and pick HTML Snippet as the code type.
- 5
Paste and load it everywhere
Paste the script tag, then under Insertion choose Auto Insert and Site Wide Footer. Switch the snippet to Active and save.
Check it works
Open your site in a new tab. The chat button appears in the bottom corner within a second or two.
What your chatbot does once it's installed
Answers from your content
Only from the pages and documents you add, with a numbered source on each answer.
Speaks your visitors' language
It replies in the language the visitor writes or speaks in.
Captures leads
When someone wants a person, it collects their details and sends you an AI summary (Pro and Business).
Books appointments
Visitors pick a free time in the chat; no double bookings (Pro and Business).
Troubleshooting and questions
I installed it but nothing appears
The chat bubble only shows once the chatbot is live. Open the chatbot in AgenBase, click Go live, then reload your site. Ad blockers can also hide chat widgets, so try a private window.
I still see the old page
Caching plugins such as WP Rocket, LiteSpeed Cache or W3 Total Cache serve saved copies of your pages. Clear the cache after saving the snippet.
The chat button appears late
Optimization plugins that “delay JavaScript” hold scripts until the visitor interacts. Add widget.js to the plugin's exclusion list.
Does it work with WordPress.com?
Yes, on WordPress.com plans that allow plugins. On plans without plugins you can't add custom scripts.
Will it slow down my site?
No. The script loads in the background (async), so your page shows first and the chat button appears right after.
What does it cost?
AgenBase is free for 50 messages a month, with no credit card. Paid plans start at $29 a month for 1,500 messages and 3 chatbots.
Let your website answer for you, day and night
Create your first chatbot for free. Add a few documents, test it in the playground, and put it on your site today.
No credit card required