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
What you get
| Feature | What it does |
|---|---|
| Answers from your content only | Your 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 links | Every answer lists the pages it came from. Links in the answer that point to other sites are removed. |
| A clear refusal | When 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 person | After 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 content | Drafts, private and password-protected items are never read, and an item that stops being public leaves the index at once. |
| Abuse resistance | Security token, hidden spam field, limits per visitor address and per conversation, a longest question, daily and monthly spending caps. |
| Prompt-injection hardening | Visitor 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 chat | Ask questions in the administration and see the passages found, with their match. |
| Unanswered questions | With the optional log: the questions your pages do not answer, the most frequent first. |
| Accessible widget | Keyboard operable, screen-reader friendly, right to left, mobile friendly, your colour and position. |
| Arabic | Questions in Arabic get answers in Arabic; the plugin and its guide are in Arabic too. |
Requirements
| Item | Details |
|---|---|
| WordPress | 6.0 or newer |
| PHP | 7.4 or newer |
| Also | WooCommerce 8.0+ is optional: with it, products can be read too |
| An AI provider | An 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. |
| License | GPL-2.0-or-later |
Install
- Unzip the package you downloaded. Inside is
ai-chatbot-from-site-content-for-wordpress.zip(do not unzip this one). - In WordPress open Plugins → Add New Plugin → Upload Plugin, choose
ai-chatbot-from-site-content-for-wordpress.zipand press Install Now. - Press Activate Plugin.
- Open AI Chatbot → Settings → AI connection, choose your provider, paste your API key and press Test the connection.
Connect your AI
| Field | Meaning |
|---|---|
| Provider | OpenAI-compatible (OpenAI, OpenRouter, Azure, Groq, Ollama, LM Studio...) or Anthropic. |
| API address | Leave empty for the official address. For another service enter it, for example http://localhost:11434/v1. |
| API key | Stored in your database (never shown again). You can define it in wp-config.php instead and the field disappears. |
| Model | The model name at your provider. A small, cheap model is enough for most tasks. |
| Maximum answer length | Caps the tokens of one answer, so a request cannot cost more than you expect. |
| Daily limit | The number of requests the plugin may make per day (0 = no limit). When it is reached the plugin stops asking until tomorrow. |
| Privacy | Hides e-mail addresses, phone numbers and card-like numbers before the text is sent. |
| Provider | How 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” chosen | By words (with Arabic normalisation). No embedding cost, but the visitor has to use words of your pages. |
First steps
- Open AI Chatbot → Settings and choose what the chatbot reads (pages, posts, products) and the policy pages to always include.
- Open AI Chatbot → Sources and press Read … items now. A progress bar shows the reading; you can stop at any moment.
- Open Test chat and ask what your visitors would ask. Check the answers and the passages.
- The chat starts for administrators only: visit your site, try it. When you are happy, set Show the chat to To every visitor.
What the chatbot reads
| Rule | Detail |
|---|---|
| Never read | Drafts, pending, scheduled, private and password-protected items, the cart, checkout and account pages, products hidden from search. |
| Leaves the index at once | An item that is unpublished, trashed, made private or given a password. |
| Read again | In the background when an item is saved (an option). An unchanged text is not sent again. |
| Excluded by you | Tick Do not use this in the chatbot in the box of the edit screen, or press Exclude in the list of sources. |
| Not read | Comments, attachments and PDF files, the output of shortcodes and dynamic blocks, custom fields (a developer filter can add them). |
The chat widget
/blog/* for a whole section), to show it only there or everywhere except there.| Accessibility | How |
|---|---|
| Keyboard | Tab 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 readers | The panel is a labelled dialog; new messages are announced by a live region. |
| Right to left | The widget mirrors itself in Arabic; answers in another direction are shown correctly. |
| Motion | Animations are turned off when the visitor asks the system for reduced motion. |
How answers are made
| Option | Meaning |
|---|---|
| Passages sent with a question | 1 to 8. More passages, more to read, higher cost. |
| Minimum match | Raise 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 questions | Earlier questions of the same conversation kept on the server for 30 minutes (never taken from the browser). |
| Reuse answers | The same first question gets the same answer without a new AI request, until the content changes. |
| Language of the answers | Empty = the language of each question. |
Talk to a person
Protection and cost
| Protection | Detail |
|---|---|
| Security token | Every 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 field | A hidden field that people do not see; a robot that fills it is refused. |
| Rate limits | Questions per minute and per day from one visitor address (stored as a salted hash, never in clear), and per hour in one conversation. |
| Longest question | Longer questions are refused; the answer has a token cap. |
| Spending caps | Daily 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 tricks | Questions 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. |
| Leaks | A hidden marker is placed in the instructions; an answer that contains it, or copies the rules, is replaced by the refusal. |
| Links | Only links to your own site are clickable; the widget never inserts HTML. |
| Proxy | The 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 appears | These 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 log and the unanswered questions
Privacy
Who can do what
| Who | Can |
|---|---|
| Administrators | Settings, AI connection, reading the site, excluding items, the test chat and the log (export and delete). |
| Editors and authors | Tick “Do not use this in the chatbot” on the items they can edit. |
| Visitors | Ask questions and send the handover form, within the limits. |
Arabic and right to left
What it does not do
| Limit | Detail |
|---|---|
| It can be wrong | An 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 written | No 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 chat | The handover is an e-mail, WhatsApp or your contact page; there is no live agent inside the widget. |
| Size of the site | Each 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 content | The 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 limits | They use WordPress transients; a persistent object cache makes them faster on busy sites. |
| Not a legal tool | It does not make your site compliant with privacy laws by itself. |
For developers
// 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
| Problem | What to do |
|---|---|
| The chat button does not appear | Check 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 question | Open 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 provider | With 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 arrive | WordPress 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.