How to add an AI chatbot to WordPress and WooCommerce
Yevhen Kurapov, co-founder · Updated Oct 13, 2026
You don't need a chatbot plugin. Create a ChatPal assistant, copy its installation script and paste it into the Footer box of a header and footer plugin such as WPCode. Add your pages under Links so it answers from them. On WooCommerce it answers from crawled product pages and files: it has no catalog, stock or order sync.
The short answer
The install itself is small: one script, pasted once into your site's footer. The work that decides whether the chatbot is any good comes after, when you choose which pages and files it learns from and test it on the questions your customers ask. After the paste, you change the chat's look and texts in ChatPal, not in WordPress.
If you run WooCommerce, know one thing before you start: ChatPal has no WooCommerce connection. It reads your product pages like any other page, so it can explain what a product is, which size to pick or how to care for it, but it can't check live stock, take items into the cart or look up an order. For a small catalog that changes slowly, that is often enough. If you need catalog answers, ChatPal does that only for Shopify and Horoshop stores.
Plugin or script
There are three ways to get a chat window onto WordPress. They end in the same place, a script on every page, and differ in what you have to maintain.
| A chatbot vendor's plugin | ChatPal's script in a header and footer plugin | ChatPal's script in footer.php | |
|---|---|---|---|
| What you install | The vendor's plugin | A general plugin such as WPCode, which you may already have | Nothing |
| Survives a theme update | Yes | Yes | Only in a child theme |
| Survives a switch to another theme | Yes | Yes | No |
| Where you change the chat | Partly in WordPress, partly with the vendor | In ChatPal; your site picks up changes within a few minutes | In ChatPal |
| Updates to keep up with | The plugin's, along with your other plugins | The header and footer plugin's | None |
For most sites the middle column is the one to choose. WPCode keeps the code outside your theme, so a theme update or a new theme doesn't remove the chat. WPCode has to stay installed and active for the code to load, so don't remove it later during a plugin clean-up.
Editing footer.php directly works too, but WordPress's own developer handbook warns that changes made in a theme's files disappear the next time the theme is updated. Only do it in a child theme. Block themes build their footer from blocks in a footer.html template part rather than a footer.php file, so the plugin route is the one for them.
On WordPress.com the rules are different. Plugins need a paid plan (Personal, Premium, Business or Commerce), and WordPress.com runs JavaScript only on a plugin-enabled plan with hosting features activated. On the free plan you can't add the script.
Step 1: create the assistant
- Go to chatpalbot.com, click Start Free Now and sign in with the one-time code sent to your email, or with Google.
- On the setup page that opens the first time, paste your website address and click Let's get started. ChatPal reads the site and drafts your assistant's instructions, welcome message and the chat window's texts. Nothing you've written yourself is replaced.
- Read the drafts in Configuration and correct anything that isn't how you work.
This takes about ten minutes, most of it reading what ChatPal drafted.
Step 2: add the chat to WordPress
First get the code from ChatPal:
- Click Integrations, then Chat Widget.
- Set the title and subtitle, colours, position and font. Generate theme from your website picks colours from your site for you. Click Save.
- Open the Embed code tab, find Installation script and click the copy icon.
The code is two short <script> tags. You only ever copy it once: when you later change the chat window's look or texts in ChatPal, your site picks up the change within a few minutes, with no new code to paste.
Then, in WordPress, with WPCode:
- In your WordPress dashboard, go to Plugins, then Add New, search for WPCode, install it and click Activate.
- Open Code Snippets, then Header & Footer.
- Paste the code into the Footer box. WPCode adds it to every page, at the end of the page.
- Click Save Changes.
Or in a child theme: open its footer.php and paste both <script> tags just before </body>.
Open your site in a private browser window. The chat button should appear in the bottom corner. If it doesn't, check that both tags were pasted, and if you use a caching plugin, clear its cache and reload.
Step 3: teach it your pages
The assistant answers only from what you give it. Give it the pages customers ask about most: pricing, shipping, returns, opening hours, the FAQ, and your main product or service pages.
- Click Configuration and open your assistant.
- On the Links tab, paste an address. Tick Single page only to add just that page, or leave it unticked to crawl the pages under it, up to your plan's link limit. Click Add Link.
- On the Files tab, click Upload files to add PDFs, Word documents or text files: a price list, a size guide, a policy document.
- Wait until each source shows Ready.
ChatPal usually strips menus, footers and cookie banners from crawled pages, so the assistant quotes your content rather than your navigation. To see exactly what it kept from a page, open the link and view its text; you can edit it there.
When you change a page on your site, click Reindex on its link in ChatPal. The assistant answers from the version it last read, so a new price on your site isn't in its answers until you do.
Two more things help:
- Instructions. Add what pages don't say: "If someone asks about stock, say you can't see live stock and give the product link." "Never promise a delivery date."
- One language at a time. On a multilingual site, ChatPal crawls the language version you point it at. The assistant still replies in whatever language the visitor writes in.
WooCommerce stores: what works and what doesn't
On a WooCommerce store, think of the assistant as a shop assistant who has read every product page carefully but has no access to the stockroom. It is not connected to your shop's database.
What works well
- "Which of these is waterproof?" "What's the difference between the two models?" "Will the medium fit me if I'm usually a 10?" Questions answered by your product descriptions and size guides.
- Shipping, returns, payment options and opening hours, from your policy pages.
- Photos: a shopper can send a picture of an item or a damaged parcel, and the assistant answers from the picture and the text together.
- Contacts and handoff: the assistant can collect a shopper's phone or email as a lead, and hand the chat to you when someone asks for a person.
What it can't do on WooCommerce
- Live stock and prices. It knows what a product page said the last time it was crawled. If you change a price or sell out, the assistant doesn't know until you click Reindex on that page.
- Cart. It can't add products to a WooCommerce cart or show what's in it.
- Orders. It can't look up "where is my order?". Give it your shipping times and tell it to pass order questions to you.
- Product cards. The tappable product cards in chat need a connected Shopify or Horoshop store.
A product feed or CSV file won't fill the gap: ChatPal refuses .csv, .xml and .json addresses as links, and file uploads take PDF, Word and text files. For a catalog of a few dozen products this is rarely a problem. For thousands of products with stock that moves daily, the answers will drift out of date.
If you run a large catalog, ChatPal's catalog features are on Shopify and Horoshop. If you are comparing chatbots for a plain website, see our comparison of AI chatbots for websites.
Test before customers see it
- Open Playground in ChatPal and ask the ten questions you answered most last month, in your customers' own words. Each answer shows which source it used, so a wrong answer tells you whether to fix a page, a file or the instructions.
- Ask something it shouldn't know: "Is the blue one in stock?" It should say it can't see live stock and point to the product page, not invent an answer.
- Ask for a person. To have chats come to you, open Configuration, open your assistant, go to Additional Settings, switch on Enable human-in-the-loop (it saves at once). On the website, the assistant then also offers the visitor a short form to leave a phone number or email, in case they close the tab before you reply.
- Repeat two or three of the questions on your live site in a private window.
Click Save as test on a conversation that went right. After each change to your pages or instructions, run the saved tests again under Assistant Tests to check nothing broke. Replies in the Playground and in tests count toward your monthly messages.
What it costs
ChatPal counts the replies the assistant writes; visitor messages are free. Every plan includes the website chat and every other channel.
- Free: 100 replies a month, one assistant. New accounts also get a one-time welcome bonus in month one.
- Starter: $20 a month for 500 replies.
- Standard: $50 a month for 1,500 replies.
- Pro: $120 a month for 4,000 replies.
Prices checked on October 13, 2026, billed monthly; see the plans. At an assumed three replies per chat, the free plan covers about 30 chats a month and Starter about 160. Count your own chats for a month to see where you land.
The free plan is enough to try the whole thing on your real site: create the assistant, paste the script into WPCode, add your shipping and returns pages, and ask it the questions you got last week. If the answers hold up, you'll know before you pay anything.