Copy the Embed code from your bot's Webchat, Deploy Settings screen in Botpress, install the WPCode plugin, add an HTML snippet with that code set to load site-wide in the body, and set it to Active. To test first, do the same on a staging copy of your site and keep the live snippet switched off until a checklist passes.
The Complete Excel Course with AI Integration
From formulas and pivot tables to Power Query, DAX, VBA and AI with Copilot, ChatGPT and Claude โ hands-on from the first lesson.
By Sagnik Bhattacharya and Virginia Thorn, Primetime Emmy Award winner
Buy nowThe embed itself takes about ten minutes. The part people skip is the rehearsal: the chat widget sits on top of every page, touches your cookie banner, your caching and your mobile layout, and talks to customers in your name. Below you will find the embed, the styling options Botpress gives you, how to feed the bot from your site, and a staging checklist, using a kitchen fitter's website as the running example.
How do you embed a Botpress webchat on WordPress?
Copy the Embed code from your bot's Webchat, Deploy Settings screen, add it in WPCode as an HTML snippet that loads site-wide in the body, and set the snippet to Active.
Botpress's WordPress guide uses the free WPCode plugin to hold the snippet. You do not edit theme files, which matters because a theme update would otherwise wipe your change.
- In the Botpress dashboard, open your workspace and select the bot. In the left sidebar go to Webchat, then Deploy Settings, and copy the Embed code. It is two script lines: an inject script from Botpress's content delivery network and a second configuration script marked defer.
- In your WordPress dashboard, open Plugins, search for WPCode and select Install Now, then activate it.
- Open Code Snippets, select Add New, then Add Your Custom Code (New Snippet), and choose HTML Snippet.
- Paste the embed code into the Code Preview field. In the Insertion section, open the Location drop-down and choose the site-wide body option. Botpress's page spells it "Side Wide Body"; the plugin's own label may read slightly differently, so pick the site-wide body entry.
- Set the snippet to Active in the upper-right corner and select Save Snippet.
Botpress's general quickstart for non-WordPress sites places the same code in the head section of the page, which is why it matters that you copy both lines exactly. Botpress also lists a published bot as a requirement, so publish before you copy the code. If your site is on WordPress.com, Botpress notes that you need a plan that allows installing plugins.
Why a snippet plugin beats pasting into a page
A page or post editor may strip or escape script tags, depending on your setup and user role. A snippet plugin treats the code as code, runs it on every page you choose, and gives you one on/off switch. WPCode describes itself on its WordPress.org page as a way to add code without editing a theme's functions file, and says it is used by over two million sites. The free version covers this job.
Why should you test a Botpress chat on a staging copy first?
A staging copy lets you catch layout clashes, caching problems and wrong public answers before customers see them, because none of them shows in the Botpress dashboard.
A staging site is a private copy of your website where you can try changes without customers seeing them. Many hosts offer a one-click staging tool, and some plugins can create one. Use whichever your host provides; the steps differ, and I have not tested every host.
Three things go wrong on live sites that you cannot see from the Botpress dashboard:
- Layout clashes. The chat button sits in a corner, often where a cookie banner, a "call us" bar or a sticky add-to-quote button already lives.
- Caching. Page caches and content delivery layers can serve an old version of a page without the script, so the bot appears on some pages and not others.
- Wrong answers in public. The first visitors become your test users if you skip the rehearsal.
Tell search engines to ignore the staging copy so it never competes with the real site. WordPress's own documentation describes the Reading setting called "Discourage search engines from indexing this site", which asks search engines not to index the site when ticked. Many staging tools set it for you; confirm it. Staging is for people with the link only.
Staging shares the live bot, and its quota
The embed code points at the same Botpress bot whichever site loads it. So every staging test is a real conversation against your allowance. Botpress's pricing FAQ counts any exchange with at least two messages from the end user in the billing month, counts emulator conversations the same, and counts multiple anonymous sessions separately. Opening ten private browser windows to test therefore costs up to ten conversations. On the Free plan's 100 a month, that disappears quickly.
If you want a protected test, create a duplicate bot in Botpress for staging and embed that one on the staging site. Botpress's dashboard has a copy option for an existing agent, which copies its configuration and workflows. Swap the embed code for the real bot's code when you go live, and note that the copy also uses your workspace's bot count and storage.
How do you style the Botpress webchat to match your site?
Style the widget in the bot's Webchat section: change the display name, avatar, composer placeholder, primary colour and font, with a live preview and no code needed.
Everything below is in the dashboard under your bot's Webchat section, with a live preview on the right. Nothing needs code unless you want it to.
| Setting | Default | What a small business would change |
|---|---|---|
| Display name | Bot | Your shop's name, or a role such as "Kitchen planning assistant" |
| Avatar | First letter of the bot's name | Your logo as a square image |
| Composer placeholder | Type your message... | "Ask about worktops, lead times or booking a visit" |
| Primary colour | #3276EA | Your brand's main hex code, checked for contrast against white text |
| Font | Inter | Any Google Font; match your site's heading font |
| Theme mode | Light | Dark only if your site is dark |
| Header style, message style, corner radius | Glass, Solid, fully rounded | Leave unless they clash with your design |
| Contact details and policies | Empty | Add email, phone, website, terms and your privacy policy link |
| Custom footer | Botpress branding | Needs a Plus plan to change |
Select Publish Configuration after changes, or visitors will keep seeing the old look. Botpress notes that these dashboard styles apply to the standard embed, not to its React library.
For finer control, the Styles section exposes named CSS classes such as bpContainer for the main window, bpFabContainer for the floating button and bpHeaderContainer for the header. Treat any custom CSS as an experiment to try on staging first, because the widget's own styles may override yours. If you do not write CSS, ask a developer for one rule at a time.
A proactive bubble, and why it needs Plus
The proactive bubble is the small "Hi! Need help?" message that pops up beside the button. It requires a Plus plan or higher, uses the default text "Hi! ๐ Need help?", and fires either after a delay or after the visitor goes idle, with the delay set in seconds. Botpress's docs add that the bubble is only a Webchat interface element, so it does not count towards message quotas or belong to any conversation. For a kitchen fitter I would write something specific, such as "Planning a kitchen? Ask about lead times", rather than the default.
Botpress also documents a script that opens the chat automatically on page load. I would not switch that on for a business site; an unrequested chat window on a phone covers the page content and sends visitors straight to the back button.
How do you feed a Botpress bot from your own website?
Add your site's pages to a Botpress knowledge base, pick only current pages, and schedule a recrawl so changes to prices and opening hours reach the bot.
In Botpress Studio, open the Knowledge Base menu, create a knowledge base and add sources. Botpress lists four useful kinds: websites (a root domain, with Botpress discovering pages you can then tick, or exact pages), documents (.pdf, .html, .txt, .doc, .docx and .md, up to 50 MB each), tables for structured data such as price lists, and a web search option.
Two choices decide quality:
- Pick pages, don't take the lot. After discovery you choose which pages to include. Leave out old news posts and out-of-date price pages, because the bot cannot tell them from current ones.
- Schedule a recrawl. By default Botpress indexes a page once and keeps using that version. Select the pages and use the Recrawl menu to pick a schedule such as Recrawl Daily, so price and opening-hours changes reach the bot.
A filled-in source list for a kitchen fitter
Say the business fits kitchens for homeowners and small landlords. A sensible first load, illustrative only:
| Source | Type | Why |
|---|---|---|
| Services and pricing pages | Specific web pages, recrawl daily | Price ranges and what is included change |
| How a fitting project runs | Document (.docx) | Survey, design, order, fit, snagging, in plain steps |
| Lead times by product type | Table | Worktops and doors have different waits |
| Warranty and aftercare | Document (.pdf) | Visitors ask this before booking |
| News archive from 2019 | Not added | Out-of-date prices would leak into answers |
Storage counts towards your plan's vector storage, which Botpress's pricing page lists as 100MB on Free and 1GB on Plus. A few dozen pages and documents fit comfortably; it is audio and video libraries that cause trouble. For answer-quality work after loading, how to stop a chatbot giving wrong answers and training a chatbot on FAQs and policies go deeper.
What should you check on a staging site before going live?
Check that the chat button appears on the home, service, contact and form pages, does not cover the cookie banner or the main button on a phone, and survives a cache clear.
Run this with the snippet active on staging only. Tick each line or write down what failed.
Loading and layout
- Visit the home page, a service page, the contact page and a page with a form. The chat button should appear on all four.
- Open each page on a phone and tablet (or your browser's device mode). The button must not cover the cookie banner, the main call-to-action or the form submit button.
- Clear every cache layer the site uses, including any caching plugin and any content delivery setting, then reload. Repeat the first check. If the button vanishes, the cache is serving old pages.
- Open the chat, scroll the page behind it, rotate the phone. Confirm it opens and closes cleanly.
- Switch the browser to a slow connection setting if it offers one, and confirm the page still loads before the widget does, not after it.
Answers
- Send the ten questions your enquiry inbox sees most. Mark each answer right, vague or wrong.
- Ask three things that are not on the site, such as a competitor's price. The bot should say it does not know and offer a person.
- Ask for a discount, a guarantee of a completion date, and legal or safety advice. The bot should refuse to promise any of them.
- Send a rude message and a message in another language. Note what happens.
- Trigger the handover or "leave your details" route and confirm someone on your team receives it.
Wrap-up
- Open the Botpress usage page and note how many conversations your test used. Subtract it from your monthly allowance in your head.
- Practise the off switch: set the WPCode snippet to Inactive, clear caches and confirm the widget disappears.
- Check the privacy policy link in the widget opens the right page.
The longer guide to testing a customer chatbot before it goes live adds scoring and sign-off steps if several people must approve the launch.
A filled-in test log from a first staging run
Write results down as you go. A log turns "it felt fine" into a list of fixes you can hand to whoever edits the site or the bot. Here is what one might look like for the kitchen fitter, with invented but realistic findings:
| Test | Result | Fix and owner |
|---|---|---|
| Button visible on home page, phone | Sits on top of the cookie banner's accept button | Dismiss banner first or move the banner up; site owner |
| Button visible on contact page | Missing after a cache clear | Exclude the snippet from the page cache; site owner |
| "How long does a kitchen take?" | Gives a range of "6 to 8 weeks" from an old page | Update the page, then recrawl; bot owner |
| "Can you guarantee fitting before Christmas?" | Answers "yes, usually" | Add a rule: never promise dates, offer a visit; bot owner |
| "Do you do commercial jobs?" | Says no, but the site lists small landlords | Add a services document with both customer types; bot owner |
| Ask for a person | Handover email arrives with no customer name | Ask for name and number before handover; bot owner |
| Privacy policy link in widget | Opens a 404 page | Correct the URL in Webchat contact settings, then Publish Configuration |
Notice that most fixes are on the website or in the knowledge base, not in Botpress's settings. That is typical. The widget is a window onto your own content, so every stale price and missing page shows up in it.
Before and after: the first line a visitor reads
The widget's first impression is the display name, the description and the composer placeholder. A weak setup says "Bot" and "Type your message..." and leaves visitors guessing what to ask. A better one tells them what the bot is for and what it will not do. For example, the name "Kitchen planning assistant", a description of "Answers questions about our services, prices and lead times. For quotes and site visits I'll pass you to the team", and the placeholder "Ask about lead times, worktops or booking a visit". Those three edits take two minutes in the dashboard and set the expectations that stop people asking for things the bot cannot do. If you add your terms and privacy policy links in the contact section, visitors can also see how their messages are handled.
If you keep the staging test log in a spreadsheet, try The Complete Excel Course with AI Integration on Coding Liquids.
Can testing on staging use up your free Botpress conversations?
Yes: anonymous sessions and Studio emulator conversations each count towards the monthly quota, so a long staging test can use up much of the Free plan.
An illustration of the quota trap. A kitchen fitter builds a bot on the Free plan and tests it on staging over one evening. Each time something looks wrong, the owner opens a fresh private window, asks two or three questions and closes it. Thirty-five rounds later, 35 anonymous sessions have each counted as a conversation, plus a dozen in the Studio emulator, which also counts.
The pricing FAQ states that anonymous sessions each count separately and that emulator conversations count the same as real ones. That leaves roughly 50 of 100 for the whole month, with the launch still to come. Free has no top-up option on Botpress's pricing page, so the owner's choices are to wait for the month to roll over or move to a paid plan. The fix would have been a written script, a single browser session reused where possible, and a duplicate test bot. Those habits cost nothing.
How many conversations do the Botpress plans include?
Botpress Free includes 100 conversations a month, Plus 250 and Team 1,500, so choose the plan before a campaign, not after. Botpress's pricing page lists Free at $0 with 100 conversations a month and three AI agents, Plus at $150 a month billed annually with 250, and Team at $750 a month billed annually with 1,500. Extra conversations on paid plans come in packs of 100 for $65 on Plus and $50 on Team, added automatically at 95% of quota.
Rough planning for the kitchen fitter, illustrative: 1,200 website visits a month, perhaps one in twenty opens the chat and sends at least two messages. That is about 60 conversations, inside Free. If a paid ad campaign triples the traffic, the same share would be about 180, which still sits inside Plus's 250 but is past Free's 100. The point is to decide which plan you are on before the campaign, not after. What 100 free conversations a month covers and the Botpress pricing plans tutorial have more scenarios.
Go-live and the first week
When the checklist passes, put the real bot's embed code into the live site's WPCode snippet, set it Active and save, clear caches, and repeat only the loading and layout checks on the live site. Then watch it.
- Day one: read every conversation in the Botpress logs, and fix anything wrong in the knowledge base the same day.
- Day three: check your usage page against the quota and your enquiry inbox against the bot's handovers.
- End of week one: list the five questions the bot got wrong or could not answer, add them to the knowledge base, and re-test them.
- Every month: review the recrawl schedule and anything that changed on the site, such as prices, opening hours or services.
For measuring the bot's value beyond conversation counts, see how to measure whether your chatbot is working. If you would rather have someone plan the staging test with you, that is the sort of thing my AI implementation consultation covers; you can reach me through the contact page.
WordPress and Botpress webchat questions
Where do I find the Botpress embed code?
In the Botpress dashboard, open your workspace, select the bot, then go to Webchat and Deploy Settings in the left sidebar. The Embed code is shown there. Copy all of it, including both script lines, and paste it into a WordPress HTML snippet rather than into a post or page editor block.
Will testing on staging use up my Botpress conversations?
Yes. A staging site loads the same bot, and Botpress counts any exchange with at least two end-user messages in the billing month, including emulator conversations, with each anonymous session counted separately. Keep a written test script, reuse one browser session where you can, and note your usage page before and after.
Can I put the chat on only some pages?
Not with the setup in Botpress's WordPress guide, which inserts the snippet site-wide in the body. Page-specific placement is a WPCode feature that its own plugin page lists under the paid version, so check the current WPCode plans. Otherwise keep the bot site-wide and use the knowledge base for page-specific questions.
How do I switch the chat off quickly if something goes wrong?
Set the Botpress snippet to Inactive in WordPress. Open Code Snippets, switch the snippet to Inactive, then save. The chat button disappears from the site once any caching layer has been cleared. Practise this once on staging so you know exactly where the switch is before a visitor reports a problem.
Further reads
- Why Is My Botpress Website Bot Not Responding? How to Fix It โ Fixes when the embedded bot stays silent
- How to Connect Botpress to Google Calendar to Book Appointments โ Let the embedded bot book visits
- How to Add an AI Chatbot That Captures Leads on Your Website โ Make the chat collect leads, not just answer
- 9 AI Chatbot Mistakes That Lose Small Businesses Customers โ Nine mistakes to avoid on a public bot
- How to Protect a Customer-Facing Chatbot From Misuse โ Guard the public bot against abuse
- How to Connect Botpress to WhatsApp: What You Can Do Alone โ Add WhatsApp to the same bot later
Show 4 more related tutorials
- WooCommerce AI Assistant Plugins: What They Do and What to Check โ What third-party AI assistant plugins do in a WooCommerce store, what they can see, and the checks to run on a staging copy first.
- Does a Small Business Need a Botpress Expert? โ Which parts of a Botpress bot a non-developer can build alone, and which three jobs are worth paying an expert to do.
- How to Build an FAQ Chatbot in Botpress From Your Own Documents โ Create a first FAQ bot from your own documents, verify its answers and decide which parts an owner can reasonably maintain.
- Botpress Calendly Integration: How a Website Bot Books Calls โ Ask qualifying questions, send a one-time Calendly link from the official integration and match each booking back to the chat it came from.
Browse all AI-for-business tutorials
Sources: Botpress Webchat and WordPress docs, Botpress knowledge base docs, Botpress pricing page, WPCode plugin directory page and WordPress Reading settings documentation (read 17 November 2026).
