Skip to content
TAQNIX
Odoo ModulesWordPress PluginsWordPress ThemesShopify ThemesApp TemplatesScripts & UtilitiesBlogSell on TAQNIX

AI Chatbot from Your Site Content for WordPress documentation

A guide to AI Chatbot from Your Site Content: connecting your AI account, reading your site, the chat widget, how answers and refusals are made, the handover, protection and cost, the log and privacy.

Documents version 1.0.0Updated Oct 29, 2026

Start here

In plain words: Visitors ask the same questions again and again: how long is delivery, can I return this, when are you open. The answers are already on your site, in pages nobody finds. AI Chatbot from Your Site Content adds a chat button to your site that answers only from your own published pages, posts and products, shows the links of the pages it used, and says “I could not find this on the site” instead of guessing when your pages have no answer. Then it offers a way to reach a person: an e-mail form, WhatsApp or your contact page.
The chat on a page of the site: two answers, each with its source.
The chat on a page of the site: two answers, each with its source.
Tip: It uses your own AI account (OpenAI-compatible or Anthropic). Spending caps, rate limits and a cache keep the cost under control.

What you get

FeatureWhat it does
Answers from your content onlyYour published pages, posts, products and chosen policy pages are split into passages. For each question the best passages are given to the AI, with the rule to answer from them only.
Source linksEvery answer lists the pages it came from. Links in the answer that point to other sites are removed.
A clear refusalWhen no passage matches well enough, the visitor reads “I could not find this on the site” and the AI is not even asked.
Talk to a personAfter a refusal, or when the visitor asks for a person: an e-mail form, a WhatsApp link and a contact page link.
Never reads private contentDrafts, private and password-protected items are never read, and an item that stops being public leaves the index at once.
Abuse resistanceSecurity token, hidden spam field, limits per visitor address and per conversation, a longest question, daily and monthly spending caps.
Prompt-injection hardeningVisitor text and site content are passed as data between delimiters; obvious tricks are blocked before the AI; an answer that repeats the instructions is replaced.
Test chatAsk questions in the administration and see the passages found, with their match.
Unanswered questionsWith the optional log: the questions your pages do not answer, the most frequent first.
Accessible widgetKeyboard operable, screen-reader friendly, right to left, mobile friendly, your colour and position.
ArabicQuestions in Arabic get answers in Arabic; the plugin and its guide are in Arabic too.

Requirements

ItemDetails
WordPress6.0 or newer
PHP7.4 or newer
AlsoWooCommerce 8.0+ is optional: with it, products can be read too
An AI providerAn account and an API key with an OpenAI-compatible service (OpenAI, OpenRouter, Azure, a local server such as Ollama...) or with Anthropic. You pay your provider for what you use; the plugin has no usage fees.
LicenseGPL-2.0-or-later

Install

  1. Unzip the package you downloaded. Inside is ai-chatbot-from-site-content-for-wordpress.zip (do not unzip this one).
  2. In WordPress open Plugins → Add New Plugin → Upload Plugin, choose ai-chatbot-from-site-content-for-wordpress.zip and press Install Now.
  3. Press Activate Plugin.
  4. Open AI Chatbot → Settings → AI connection, choose your provider, paste your API key and press Test the connection.

Connect your AI

In plain words: The plugin works with your own AI account. In Settings → (this plugin) → AI connection choose the provider, paste the key and press Test the connection: a green message tells you that the model answered.
FieldMeaning
ProviderOpenAI-compatible (OpenAI, OpenRouter, Azure, Groq, Ollama, LM Studio...) or Anthropic.
API addressLeave empty for the official address. For another service enter it, for example http://localhost:11434/v1.
API keyStored in your database (never shown again). You can define it in wp-config.php instead and the field disappears.
ModelThe model name at your provider. A small, cheap model is enough for most tasks.
Maximum answer lengthCaps the tokens of one answer, so a request cannot cost more than you expect.
Daily limitThe number of requests the plugin may make per day (0 = no limit). When it is reached the plugin stops asking until tomorrow.
PrivacyHides e-mail addresses, phone numbers and card-like numbers before the text is sent.
Tip: The table Recent use at the bottom of the tab shows the requests, the errors and the tokens of the last days.
The AI connection tab after a successful test.
The AI connection tab after a successful test.
ProviderHow passages are found
OpenAI-compatible with an embedding model (for example text-embedding-3-small)By meaning: “when can I get my sofa?” finds the delivery page even without the word delivery.
Anthropic, or “by words only” chosenBy words (with Arabic normalisation). No embedding cost, but the visitor has to use words of your pages.

First steps

  1. Open AI Chatbot → Settings and choose what the chatbot reads (pages, posts, products) and the policy pages to always include.
  2. Open AI Chatbot → Sources and press Read … items now. A progress bar shows the reading; you can stop at any moment.
  3. Open Test chat and ask what your visitors would ask. Check the answers and the passages.
  4. The chat starts for administrators only: visit your site, try it. When you are happy, set Show the chat to To every visitor.
The sources: what is read, waiting or failed, the passages and the spending.
The sources: what is read, waiting or failed, the passages and the spending.

What the chatbot reads

In plain words: Only published items of the content types you choose, plus the policy pages you tick, are read. The text of an item (for a product also its price, stock, SKU, categories and attributes) is split into passages of the size you choose; each passage gets an embedding stored in a table of your database.
RuleDetail
Never readDrafts, pending, scheduled, private and password-protected items, the cart, checkout and account pages, products hidden from search.
Leaves the index at onceAn item that is unpublished, trashed, made private or given a password.
Read againIn the background when an item is saved (an option). An unchanged text is not sent again.
Excluded by youTick Do not use this in the chatbot in the box of the edit screen, or press Exclude in the list of sources.
Not readComments, attachments and PDF files, the output of shortcodes and dynamic blocks, custom fields (a developer filter can add them).
Reading the site in batches, with a progress bar and a stop button.
Reading the site in batches, with a progress bar and a stop button.

The chat widget

In plain words: The settings choose the title, the button text, the welcome message, up to 4 suggested questions, the placeholder, the privacy notice shown under the field, the main colour (the text colour is chosen for contrast) and the corner. Where the chat appears lists pages by ID or path (/blog/* for a whole section), to show it only there or everywhere except there.
On a phone the panel takes the bottom of the screen.
On a phone the panel takes the bottom of the screen.
AccessibilityHow
KeyboardTab to the button, Enter to open, Enter to send, Shift+Enter for a new line, Escape to close; the focus returns to the button.
Screen readersThe panel is a labelled dialog; new messages are announced by a live region.
Right to leftThe widget mirrors itself in Arabic; answers in another direction are shown correctly.
MotionAnimations are turned off when the visitor asks the system for reduced motion.

How answers are made

In plain words: For each question the best passages are found. If none reaches the minimum match, the refusal is shown at once and the AI is not asked. Otherwise the passages and the question are sent to the AI with the rule to answer only from them, in the language of the question, and to name the passages it used. An answer without a valid source becomes the refusal.
The test chat: the answer, its source and the passages found, with their match.
The test chat: the answer, its source and the passages found, with their match.
A question the site does not answer: the AI was not asked.
A question the site does not answer: the AI was not asked.
OptionMeaning
Passages sent with a question1 to 8. More passages, more to read, higher cost.
Minimum matchRaise it if the chatbot answers off-topic questions, lower it if it refuses good ones (the test chat shows the closest passages). The default of 30% was set with the test model of the plugin, not measured with a real embedding model: try it in the test chat with your own questions before you open the chat to everyone.
Follow-up questionsEarlier questions of the same conversation kept on the server for 30 minutes (never taken from the browser).
Reuse answersThe same first question gets the same answer without a new AI request, until the content changes.
Language of the answersEmpty = the language of each question.

Talk to a person

In plain words: After a refusal, when the visitor presses Talk to a person, or types something like “I want to talk to a human”, the chat offers the ways you set up: a short e-mail form (sent to the address of the settings, with the visitor's address as reply-to), a WhatsApp link with the question ready to send, and your contact page.
A refusal with the three ways to reach the team.
A refusal with the three ways to reach the team.
The e-mail form inside the chat.
The e-mail form inside the chat.

Protection and cost

In plain words: The chat is public, so it is built to resist abuse and to cap your spending.
ProtectionDetail
Security tokenEvery question carries a WordPress nonce; a page served from a cache gets a fresh one automatically. For visitors who are not logged in this token is the same for everyone for about 12 hours: it stops other sites from sending questions through the browser of your visitors, it does not stop a robot. The rate limits and the spending caps are what stop robots.
Spam fieldA hidden field that people do not see; a robot that fills it is refused.
Rate limitsQuestions per minute and per day from one visitor address (stored as a salted hash, never in clear), and per hour in one conversation.
Longest questionLonger questions are refused; the answer has a token cap.
Spending capsDaily and monthly, estimated from the prices you enter. Before each question its worst cost is booked (questions that arrive at the same moment are counted one after the other) and corrected with the real cost after the answer; when a cap would be passed the chat shows a friendly “unavailable” message.
Prompt tricksQuestions like “ignore your instructions” are not sent to the AI (an option). Visitor text and site content are passed as data between delimiters, with angle brackets neutralised.
LeaksA hidden marker is placed in the instructions; an answer that contains it, or copies the rules, is replaced by the refusal.
LinksOnly links to your own site are clickable; the widget never inserts HTML.
ProxyThe visitor address is read from X-Forwarded-For only if you say your site is behind a proxy (otherwise it could be faked). The last address of the header is used: the one your proxy adds (the first ones are written by the visitor). For another setup a developer filter (tqcb_visitor_ip) gives the address.
Where the chat appearsThese rules hide the widget; they do not protect anything. When the chat is open to everyone, its questions can be sent from any page.
The protection and cost settings.
The protection and cost settings.
Important: The estimates use the prices you type. Check the real usage in the page of your provider: the caps protect you, they are not your bill.

The log and the unanswered questions

In plain words: The log is off by default. When you turn it on, each question (with e-mail addresses and phone numbers masked) and its answer are saved with a scrambled conversation number; no IP address, no browser data. Entries older than the retention are deleted every day. Questions of the test chat are not logged.
The questions the pages do not answer, the most frequent first.
The questions the pages do not answer, the most frequent first.
Every entry, with the outcome and the conversation.
Every entry, with the outcome and the conversation.
Tip: Add the missing answer to a page, press Test again: the page is read again when you save it.

Privacy

In plain words: Using an AI model means sending text to your provider. The question of the visitor (e-mail addresses, phone numbers and long numbers are always masked first) and the best passages of your public pages are sent. Nothing about the visitor (address, browser) is sent. E-mail addresses, phone numbers and card-like numbers are masked first (an option, on by default). Nothing is sent to Taqnix. Mention your AI provider in your privacy policy: the plugin adds a suggested paragraph in Settings → Privacy.
Important: AI can be wrong. Treat what it writes as a draft and read it before you publish it.
In plain words: Show a short privacy notice in the widget (a setting, filled by default) and mention the chatbot in your privacy policy. The plugin does not promise compliance with any law: you decide what is right for your site.

Who can do what

WhoCan
AdministratorsSettings, AI connection, reading the site, excluding items, the test chat and the log (export and delete).
Editors and authorsTick “Do not use this in the chatbot” on the items they can edit.
VisitorsAsk questions and send the handover form, within the limits.

Arabic and right to left

In plain words: A question in Arabic gets an answer in Arabic, even when the pages are in English. The widget and the administration are translated into Arabic and work right to left.
The chat on an Arabic page.
The chat on an Arabic page.
The sources screen in an Arabic WordPress.
The sources screen in an Arabic WordPress.

What it does not do

LimitDetail
It can be wrongAn AI can misread a passage. Answers carry their sources and a notice; check the test chat before you open the chat to everyone.
Only what is writtenNo order status, no stock in real time between two readings, no account data, no actions (it does not add to the cart or book anything).
No live chatThe handover is an e-mail, WhatsApp or your contact page; there is no live agent inside the widget.
Size of the siteEach question is compared with every passage of the index (the number of passages is on the Sources screen). Measured on a fast computer with PHP 8.3 and 1536-number embeddings (as text-embedding-3-small): 5,000 passages take about 1.3 s per question, 50,000 passages about 12 s, before the AI answers; memory stays small. By words only: about 0.1 s and 0.8 s. A shared host is slower. Above about 10,000 passages choose By words only, read fewer content types or lower Passages per item.
Members-only contentThe chatbot follows the WordPress status and password of an item only. Text that a membership or restriction plugin hides on a published item is read and can be quoted: exclude such items (box of the edit screen, the Exclude button, or the tqcb_indexable filter).
Rate limitsThey use WordPress transients; a persistent object cache makes them faster on busy sites.
Not a legal toolIt does not make your site compliant with privacy laws by itself.

For developers

In plain words: Skip this chapter if you only use the plugin.
// Ask the chatbot from your own code (same rules as the widget: sources, refusal, caps)
$r = TQCB_Chat::ask( 'How long does delivery take?' );
// $r['type'] is answer, refusal, handover or unavailable; $r['text'], $r['sources'] (title, url)

// Keep some items out of the index (drafts, private items and passwords are always out)
add_filter( 'tqcb_indexable', function ( $ok, $post ) {
	return $ok && ! has_category( 'internal', $post );
}, 10, 2 );

// Add a custom field to the text that is read
add_filter( 'tqcb_item_text', function ( $text, $post ) {
	return $text . "\n\nOpening hours: " . get_post_meta( $post->ID, 'hours', true );
}, 10, 2 );

// Your brand voice (keep the rules of the prompt)
add_filter( 'tqcb_system_prompt', function ( $prompt ) {
	return $prompt . "\nUse a warm, short style.";
} );

// Hide the widget on some pages
add_filter( 'tqcb_show_widget', function ( $show ) {
	return $show && ! is_page( 'landing' );
} );

// The key can live in wp-config.php
define( 'TQCB_AI_KEY', 'sk-...' );

Troubleshooting

ProblemWhat to do
The chat button does not appearCheck Show the chat (administrators only at first), the page rules, and that the AI connection is set up.
“I could not find this on the site” for a good questionOpen the test chat: if the right passage is just below the minimum match, lower it; if it is missing, check that the page is read (Sources).
Items stay “Waiting”Press Read … items now. In the background the reading uses WP-Cron, which runs when the site has visits.
Embeddings need an OpenAI-compatible providerWith Anthropic choose By words only, or use an OpenAI-compatible service for the embeddings.
“The chat is resting for now”A spending cap is reached, or the AI does not answer. See the cards of the Sources screen and the AI connection test.
“You are asking a lot of questions”A rate limit is reached. Raise it in the settings if real visitors meet it.
The handover e-mail does not arriveWordPress must be able to send mail; use an SMTP plugin if other mails of the site do not arrive either.

Updating and removing

Install the new zip over the old one in Plugins → Add New Plugin → Upload Plugin (WordPress offers to replace the current version), or replace the folder ai-chatbot-from-site-content-for-wordpress by FTP. Your settings, the index and the log are kept. To remove the plugin, deactivate and delete it: its settings, its tables (index and log), its post meta and its scheduled tasks are removed with it.

Support

Installation help and bug fixes are included for 6 months, with lifetime updates. Contact us through the marketplace page where you bought the plugin or write to support@taqnix.com with your WordPress version, the plugin version and a screenshot.