Use cases

WordPress chatbot: add an AI agent to your site in an hour

Adding a chatbot to WordPress takes about an hour: train it on your site, paste the embed script or use a plugin, pick the pages and test on mobile before you tell anyone.

By the Askocto team · · 4 min read

A WordPress chatbot is a chat widget on your WordPress site that answers visitors from your content. Adding one takes about an hour: train the agent on your pages, install it by plugin or script, decide where it shows and test on mobile. This guide walks through each step and the checks that keep the site fast and the visitors informed.

In short: Train on your site, install by script or plugin, show the chat on the right pages, test on mobile and set up a way to reach a person.

Plugin or script

There are two common ways to put a chatbot on WordPress.

Method How it works Good for Watch for
Plugin Install from the plugin screen, enter a key or agent ID People who prefer settings in the admin Plugin updates and conflicts
Embed script Paste a snippet in the header or footer Full control, fewer moving parts Needs a safe place to paste

If a plugin is offered by your chatbot provider, check its documentation and the date of its last update. If you use the script route, add it with a header and footer snippets plugin or a theme setting, not by editing core files, so a theme update does not erase it.

Step 1: train the agent on your site

Before touching WordPress, create the agent and give it content. In Askocto, open Build > Sources, choose Website and enter your URL or sitemap. Add PDFs for price lists or manuals and Q&A pairs for answers you want worded exactly. Watch the status move from Queued to Training to Ready. The guide to training an agent on your help center covers content preparation.

Clean the site first. Old posts, draft pages and duplicate policies confuse any chatbot, so remove or update them.

Step 2: install it

With Askocto the embed script looks like this:

<script src="https://cdn.askocto.co/embed.js" data-agent-id="agt_123" defer></script>

Replace the agent ID with your own. Paste the snippet in your footer through a header and footer plugin or your theme options, save and reload. The chat bubble should appear. The WordPress integration guide covers the steps, and the article on embedding a chat widget on any website covers the general case. If you want a step-by-step on the CMS side, see how to add a chatbot to WordPress.

Step 3: choose where it shows

A chat bubble on every page is not always right. Consider:

  • Show on: product pages, pricing, contact, checkout and help pages.
  • Hide on: landing pages built for one action, the checkout payment step if it distracts, and pages with forms that already convert well.
  • Logged-in areas: if your site has member pages, identify the user so the agent knows who is asking, and keep other visitors out of those answers.

If you run WooCommerce, ask the agent about order questions only after you set up verification. The widget can be controlled from your own code with window.askocto.open(), so a "Chat with us" button in a menu can open it.

Step 4: test on a phone

Check these on a real phone and on a laptop:

  1. The bubble does not cover a button or a cookie banner.
  2. The chat opens and closes without scrolling the page.
  3. The first message is relevant to the page.
  4. The page speed is still acceptable. Compare before and after with your usual speed test.
  5. The widget works with your caching and optimization plugins.

Clear the site cache after you add the script, or you may test an old version.

Step 5: privacy and handoff

Tell visitors that the chat is an AI and where messages go. Link your privacy policy in the chat or on the page, and update it to cover the chat. This is not legal advice, so check the rules for your region and your cookie setup.

Also set a handoff. When the agent cannot help, it should say so and offer a way to reach a person: a ticket in the Helpdesk, a contact form or an email address. The Helpdesk feature page shows how handoffs arrive on the team side.

What to do after launch

Review conversations daily for the first week. Look at the unanswered questions, add content for the gaps and retrain. Set Auto-retrain on a schedule so new posts and pages are picked up. For wider context, see the guide to the best chatbots for a website.

Frequently asked questions

Do I need a plugin to add a chatbot to WordPress?

No. Many chatbots install with a script snippet pasted into your header or footer. A plugin is a convenience if one is available.

Will a chatbot slow down my WordPress site?

Widgets load scripts, so it can have some effect. Load the script with defer, compare page speed before and after and adjust where the widget appears.

Can the chatbot read my WooCommerce orders?

That depends on the connection and verification you set up. Do not let the agent show order details until it checks who is asking.

Can I hide the chatbot on some pages?

Yes. Most installs let you add the script only on chosen pages, or you can control when the widget opens with the page's own code.

Train an agent on your own help center

Askocto answers the repeat questions across chat, email and voice and hands the hard ones to your team.

Keep reading

All articles