# WordPress plugin

URL: https://aihio.ai/en/docs/chatbot/wordpress-plugin
Description: Add the Aihio chatbot to WordPress with the official plugin and a one-click connection.

The official **Aihio Chatbot** plugin links your chatbot to a WordPress site without any code. Aihio stores your data primarily in the EU and is GDPR-compliant (language model APIs run in the US under Standard Contractual Clauses), and the plugin can identify logged-in users with verified identity.

## Install the plugin

1. In the WordPress admin, go to **Plugins → Add New**.
2. Search for **Aihio Chatbot**.
3. Click **Install Now**, then **Activate**.

## Connect to Aihio

The plugin uses a secure one-click connection (OAuth), so you never copy the chatbot ID by hand.

1. Open **Settings → Aihio Chatbot**.
2. Click **Connect to Aihio**. You are taken to the Aihio dashboard.
3. Approve the connection and choose the chatbot you want on the site.

The chat widget then appears on your site right away. You can switch chatbots at any time by connecting again.

## Identify logged-in users

Optionally, you can tell the chatbot who the logged-in user is. Identity is verified server-side.

1. Find the identity secret in the chatbot's **Publish (Julkaise)** view, in the **Identity verification** section next to the embed code.
2. Add it to WordPress as the `AIHIO_IDENTITY_SECRET` constant in `wp-config.php` (recommended) or in the plugin's setting field.
3. Enable **Identify logged-in users** in the plugin settings.

## Consent and cookies

If your site uses a consent manager (Complianz, CookieYes, Real Cookie Banner), the plugin can follow its state. Enable **Defer loading to the site's consent manager** so the chat widget loads only after functional consent is granted.

## Manual alternative

If you prefer not to use the plugin, you can paste the embed snippet by hand. See the [Publish guide](/en/docs/chatbot/publish).
