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. 1

    Preferred: install a code-snippets plugin (WPCode, Code Snippets, or similar).

  2. 2

    Create a new snippet, set its location to 'Site Footer' or 'Before </body>'.

  3. 3

    Paste your RubyRep snippet and activate it.

  4. 4

    Alternative: if your theme has a Custom Scripts or Footer Code field under Appearance → Customize, paste it there instead.

  5. 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

Get your snippet.

Enter your WordPress site and RubyRep reads it, builds your representative, and hands you the exact line to paste.

https://

Takes about a minute. No credit card.

Using something else? See all platforms.