WordPress powers a large share of small business websites, and adding an AI chatbot to it is one of the easiest installations you will do. The chatbot itself lives on the vendor's servers. Your site only needs a small snippet that loads it. This guide shows three ways to add that snippet, how to handle caching plugins, how to check the effect on speed and what to do when the chat does not appear.
If you have not chosen a chatbot yet, start with how an AI website assistant works. If you already have the snippet from your dashboard, read on.
Before you install: get your embed snippet
Every chatbot product gives you a short snippet of code, usually a single `script` tag that looks like a web address wrapped in HTML. In Crescelo you find it on the Overview page under 'Add to website', or under the Deploy button in the top bar. Copy it exactly. Do not edit the assistant ID in it, because that ties the chat to your account and your content.
Also finish the preparation first: load your services, prices and policies and test the assistant in the testing area. The order matters, because the chat becomes public the moment the snippet goes live. The full preparation list is in our step-by-step guide to adding an AI chatbot.
Method 1: A header and footer plugin (easiest and safest)
This is the best method for most people because it survives theme changes and does not touch code files.
- In WordPress, go to Plugins, then Add New Plugin.
- Search for a plugin that inserts headers and footers, such as one named 'Insert Headers and Footers' or 'WPCode'. Choose a well-maintained one with recent updates and many active installations.
- Install and activate it.
- Open its settings. Find the box labelled 'Scripts in Footer' or add a new footer snippet.
- Paste the snippet from your chatbot dashboard and save.
- Visit your site in a private browser window. The chat bubble should appear within a few seconds.
Advantages: no theme edits, easy to switch off, works with block themes. Disadvantage: one more plugin to keep updated.
Method 2: Paste into the theme footer
If you prefer not to add a plugin, place the snippet in your theme's footer file just before the closing body tag.
- Go to Appearance, then Theme File Editor. On some sites this is disabled for safety; if so, use Method 1 or Method 3.
- Select the file called Theme Footer (footer.php).
- Find the closing `</body>` tag. Paste the snippet on the line above it.
- Click Update File.
A theme update can overwrite this change. To avoid that, use a child theme (Method 3) or the plugin method. Always take a backup before editing theme files.
Method 3: A child theme (best for developers)
A child theme keeps your customisations separate from the main theme so updates do not erase them. Add the snippet in the child theme's functions file using the standard hook that prints code in the footer.
- Create or open your child theme's functions.php.
- Register a function on the wp_footer action that prints the snippet.
- Save and check the front end.
- Optionally, wrap it so it only runs on selected pages, such as your services and contact pages, using WordPress's conditional tags.
This method gives you the most control, including hiding the chat on checkout, account or landing pages where it would distract from the main call to action.
Block themes and the Site Editor
Newer 'block themes' do not have a classic footer.php. Use the plugin method, or add a Custom HTML block to the site footer template in the Site Editor. Open Appearance, then Editor, then Patterns or Templates, edit the footer, add a Custom HTML block and paste the snippet. Save and test.
Caching, optimisation and security plugins
Most WordPress problems with third-party widgets come from a plugin that changes how scripts load.
| Symptom | Likely cause | What to try |
|---|---|---|
| Chat not visible after install | Page cache serving the old page | Clear the site cache and the CDN cache, then reload in a private window |
| Chat appears late or flickers | Script delayed by an optimisation plugin | Exclude the chat script from 'delay JavaScript' settings, or accept a short delay for speed |
| Chat blocked with a console error | Content security policy or firewall rule | Allow the chatbot's domain for scripts and connections in your security plugin |
| Chat appears twice | Snippet added in two places | Remove one copy from the plugin or theme |
| Chat hidden behind other elements | Another fixed element has a higher layer | Adjust the offset in the widget's position settings |
Check the effect on speed
A widget adds some weight, so measure it. Run your key pages through a tool such as PageSpeed Insights before and after installing and compare the main numbers. A well-built widget loads after your page content, so it should not delay what visitors see first. If you see a large drop, exclude the chat from pages where it is not needed or check that the script loads asynchronously. Our note on the performance of embedded chat widgets explains what to look for.
WooCommerce and membership sites
On shops and membership sites, decide where the chat helps. It is useful on product and pricing pages and on the contact page. It can distract on the checkout page, where you want a visitor to finish paying. Conditional loading in a child theme, or the page targeting feature of a header and footer plugin, lets you show the chat on some pages only.
Keeping the assistant accurate as your site changes
Your WordPress pages change: prices, hours, offers. The chatbot only knows what you gave it. If your product can read your website address, re-index after big changes. Otherwise re-upload the changed documents. Put a reminder in your calendar to review the assistant's conversations weekly; our guide to reviewing chatbot conversations shows what to look for.
Troubleshooting checklist
- Confirm the snippet is exactly as copied, including the assistant ID.
- Confirm it appears in the page source: view the page source and search for the snippet.
- Clear the site, browser and CDN caches.
- Temporarily disable optimisation plugins to see if one is blocking it.
- Open the browser console (right-click, Inspect, Console) and look for red errors mentioning the chat domain.
- Test in a private window with extensions off. Some ad blockers hide chat widgets.
- Check the assistant is switched on and the domain is allowed in its settings.
Using Google Tag Manager instead
If you already manage scripts with Google Tag Manager, you can load the chatbot from there. Create a new tag of the 'Custom HTML' type, paste the snippet, set the trigger to 'All Pages' (or to specific pages) and publish the container. This keeps all your third-party scripts in one place and makes it easy to switch the chat on or off without touching WordPress. One caution: if your visitors must consent before third-party scripts run, wire the trigger to your consent tool so the chat only loads after consent where the law requires it.
WordPress multisite and staging sites
On a multisite network, add the snippet in each subsite, or in a network-wide must-use plugin if every site should show the same assistant. Use a separate assistant for each brand or language site so the knowledge stays clean. On a staging copy of your site, install the snippet only if you want to test; otherwise remove it before pushing to production, or you may count test conversations in your statistics.
Cookie banners and consent
Many WordPress sites use a consent plugin. A chat widget may store an identifier in the visitor's browser so a conversation continues after a reload. Describe this in your cookie policy and, where the law requires consent for non-essential storage, configure your consent plugin to control the chat script. Vendors differ on whether the identifier is strictly necessary; ask yours, and read the GDPR checklist for website chatbots before you go live in Europe.
Rolling back safely
If anything goes wrong, undoing the change should take seconds. With the plugin method, empty the footer box and save. With a theme edit, remove the line you pasted. With Tag Manager, pause the tag. Because the chatbot lives on the vendor's servers, removing the snippet removes it from the site instantly, and your assistant, content and conversations remain safe in your dashboard.
Tips for shops, bookings and lead-generation sites
- Service businesses: show the chat on the services, pricing and contact pages, and connect booking so visitors can reserve a time inside it.
- Shops: use it for delivery, returns and product questions, and hide it on the checkout page.
- Lead-generation sites: enable lead capture so every enquiry arrives by email with the conversation attached.
- Membership and course sites: load your course outline and FAQ into the knowledge base to answer 'what is included' questions.
The lead capture feature and appointment booking feature pages explain how each works.
Frequently asked questions
What is the easiest way to add a chatbot to WordPress?
Use a header and footer plugin and paste your chatbot's snippet into the footer box. It does not touch theme files and survives theme updates.
Do I need a special WordPress chatbot plugin?
Not necessarily. Many chatbot products give you a snippet that works on any site, so a general footer plugin is enough. Some vendors also provide their own plugin.
Will a chatbot slow down my WordPress site?
It can add some weight. A widget that loads after your content has little effect on what visitors see first. Measure with a speed testing tool before and after.
Why can I not see the chat after installing?
Most often the page cache is serving the old version, or an optimisation plugin is delaying or blocking the script. Clear caches and check the plugin settings.
Can I show the chat on some pages only?
Yes. Use a child theme with conditional tags, or the page targeting options in a header and footer plugin.
Does it work with page builders like Elementor?
Yes. Use the footer plugin method, or add an HTML widget to a global footer template in the builder.
Once your snippet is live, test a full booking or lead in your own site. If you need help, the help centre and support tickets are there. New to this? Start a free trial and use the playground to rehearse first.
Further reading
- Google Search Central: creating helpful, people-first content: What Google looks for in useful pages.
VASTAA JOKAISELLE KÄVIJÄLLE. VARAA AIKA NIILLE, JOTKA OVAT VALMIITA.
Ota Crescelo käyttöön verkkosivustollasi 15 minuutissa
Opeta avustajasi hinnastoillasi, asiakirjoillasi ja palveluehdoillasi. Ota käyttöön lähteisiin perustuvat vastaukset ympäri vuorokauden ja päällekkäisyydettömät ajanvaraukset suoraan chatissa.