How to add an AI chatbot to WordPress
The safest way to add an AI chatbot to WordPress is a code-snippets plugin or your theme's built-in footer-scripts field — not editing footer.php, which a theme update will overwrite. All three methods take under five minutes.
Where it goes
Appearance → Theme File Editor, or a code-snippets plugin
Availability: Self-hosted WordPress on any plan. WordPress.com requires a Business plan or higher to add custom scripts.
Adding the chatbot to WordPress
- 1
Preferred: install a code-snippets plugin (WPCode, Code Snippets, or similar).
- 2
Create a new snippet, set its location to 'Site Footer' or 'Before </body>'.
- 3
Paste your RubyRep snippet and activate it.
- 4
Alternative: if your theme has a Custom Scripts or Footer Code field under Appearance → Customize, paste it there instead.
- 5
Load any page on your site and confirm the launcher appears.
The snippet you paste
<script src="https://rubyrep.com/rubyrep.js" data-rubyrep="rr_your_public_key" defer></script>Your own key replaces rr_your_public_key — you get it after training RubyRep on your site.
Worth knowing on WordPress
Do not paste it directly into footer.php. The next theme update overwrites the file and silently removes your chatbot.
If you must edit theme files, use a child theme — that survives updates.
WordPress.com (the hosted service) blocks custom JavaScript below the Business plan. Self-hosted WordPress.org has no such limit.
Aggressive caching plugins can serve a stale page without the snippet. Purge your cache after installing.
WordPress questions
- Plugin or theme file?
- A snippets plugin, almost always. It survives theme changes and updates, and removing the chatbot later is one toggle instead of a file edit.
- Does it work with WooCommerce?
- Yes — WooCommerce is WordPress, so the same install applies. RubyRep reads your product and policy pages like any other page.
- Will it conflict with my existing plugins?
- It shouldn't. The launcher renders inside a shadow root and the chat panel inside an iframe, so plugin CSS and RubyRep's styles cannot reach each other.
Related
tool
Website support score
Scores a website on how well it could support customers — and how well an AI representative trained on it would perform. Five dimensions, a total out of 100, and the specific gaps behind the score.
tool
Website FAQ generator
Reads your website, extracts any FAQ content already published, and drafts the questions your pages answer but never state as questions. Output is copy-paste ready.
guide
How to add an AI chatbot to your website
Adding an AI chatbot takes minutes. Making it answer correctly takes preparation. This covers what to check before you install anything, how installation actually works, and the three failure modes that make businesses take chatbots back down.
Get your snippet.
Enter your WordPress site and RubyRep reads it, builds your representative, and hands you the exact line to paste.
Using something else? See all platforms.