
WordPress runs about 43% of the web, and for most small businesses, installing an AI chatbot first happens there. Aihio AI drops into a WordPress site with one line of code, the same way you’d add Google Analytics. The install takes about five minutes, and all data stays in the EU.
This guide walks through three install paths (a plain HTML snippet, a WordPress plugin, and an Elementor Custom HTML block) plus a GDPR-compliant consent setup.
Before you start
You’ll need:
- Admin access to WordPress
- An Aihio account (the free tier is enough)
- Your brand colours ready (primary plus text colour for the chatbot)
Sign in to Aihio and paste your website URL. The AI crawls your site and builds a knowledge base, which takes anywhere from a few seconds to a minute or two depending on site size. Once it’s ready, go to Settings → Embed and copy the code.
It looks like this:
<script src="https://aihio.ai/widget/aihio-loader.js" data-chatbot-id="your-chatbot-id" async></script>Path 1: Add the code to your theme (most direct)
On a standard WordPress install there are two ways to do this.
Option A: Appearance → Customize → Additional settings → Header code
If your theme supports head edits through the customizer (most modern themes do), use it. You add the code once and it survives theme updates.
Open Appearance → Customize
Click “Customize” in the top bar. Find “Additional settings” or “Custom Code” in the menu. The exact label varies by theme.
Paste the code into the head field
Open “Head” or “Header scripts” and paste Aihio’s
<script>snippet. Save.Reload the site and test
Open your site and wait a few seconds. The chat window appears in the bottom-right corner.
Option B: A plugin like “Insert Headers and Footers”
If your theme doesn’t expose a head edit, install a free plugin like Insert Headers and Footers (WPCode) or Head, Footer and Post Injections. Paste the Aihio code into the plugin’s “Header” field.
Path 2: Elementor + Custom HTML
If your site is built with Elementor, you can add the chatbot to a single page or globally.
One page only
Edit the page in Elementor, drop in an “HTML” widget, and paste the code. The chatbot shows only on this page.
Globally across the site
Elementor Pro users: go to Templates → Theme Builder → Header, open the header template, and add an HTML widget inside the header. The code now runs on every page.
Path 3: Aihio WordPress plugin (coming soon)
Aihio’s own WordPress plugin is due in Q2 2026. It ships with a graphical install, built-in consent handling, and automatic detection of site changes. Keep an eye on the changelog.
GDPR and consent
The chatbot stores a couple of keys in the browser’s local storage (conversation ID and session state). These are not cookies, but they may still be treated as online identifiers under GDPR depending on your implementation and legal assessment — check this with your DPIA. Even so, many consent platforms treat every “third-party script” the same way.
Working with Cookiebot, Complianz, and others
Most Finnish WordPress sites use Complianz or Cookiebot for consent. Both support conditional script loading:
If you decide the chatbot needs consent, wrap the loader in a consent component:
<!-- Complianz: wait for consent before loading --><script type="text/plain" data-category="functional" src="https://aihio.ai/widget/aihio-loader.js" data-chatbot-id="your-chatbot-id"></script>Test that the chatbot actually appears after the user accepts cookies. Complianz sometimes needs a page reload.
Common problems
”The chatbot doesn’t show up at all”
Open the browser dev tools (F12 → Console):
404 aihio-loader.js: the script URL is mistyped, blocked by a browser extension/firewall, or unavailable at the requested path.CSP blocked: your site has a Content Security Policy that blocks third-party scripts. Addaihio.aito the exceptions.
”The chatbot responds slowly”
The first reply can take 2–5 seconds while the AI processes the question. If you’re waiting more than 10 seconds, check the admin panel for the knowledge base size. A knowledge base over 1 000 pages slows answers down.
”The chatbot asks the visitor to sign in”
WordPress’s default CSP sometimes blocks Aihio connections. Aihio’s chatbot settings live in the app itself and don’t require any sign-in on the visitor’s side.
Test before going live
Once the code is in, do this before you publish:
Open the site in an incognito window
That way you see what a regular visitor sees. Don’t test while signed in as admin.
Wait 3–5 seconds
The chat window should finish loading in that time. If not, check the Console tab in dev tools.
Ask a test question
Ask the chatbot something from your site content (opening hours, contact details). The answer should arrive correctly in a few seconds.
Check the mobile view
Open the site on your phone. The chat window scales to mobile automatically, but its position shouldn’t cover critical content or CTA buttons.
Frequently asked questions
Does the chatbot work with every WordPress theme? ▾
Yes, as long as the theme supports adding a plain <script> tag to the head. If your theme is restrictive (a rare Astra, GeneratePress, or Kadence variant), use the Insert Headers and Footers plugin.
Does the chatbot slow down my site? ▾
Aihio uses the async attribute, so the script doesn’t block the initial page load. The chatbot loads in the background after the page’s main content is ready. Google PageSpeed scores typically drop 0–3 points.
Can I show the chatbot only on specific pages? ▾
Yes. Scope the code’s visibility with a plugin like Widget Logic or Conditional CSS. The most common use case: show the chatbot only on the home page and the contact page.
How do I update the chatbot's knowledge base? ▾
Log in to the Aihio admin panel and upload new pages or documents. The chatbot starts using the updated content right after save. No WordPress code changes needed.
Install done
Once the code is on your site and the test question works, the chatbot is live. Watch the analytics for the first week: which questions repeat, where the chatbot can’t answer, and how long conversations run.
Create a free chatbot and embed it on your WordPress site in under five minutes.



