← All posts
Guides7 min read

[GUIDES] · Aug 4, 2026 · 09:10

Add live chat to WordPress without another bloated plugin

One snippet on the wp_head hook covers every page, theme and block template, and survives theme updates. No plugin sprawl, no per-seat chat add-on, and an AI that answers from your own posts and docs.

Tm

The muro team

muro.chat

#wordpress#live chat#wp_head#woocommerce#ai support#widget install

Search wordpress live chat and the results are a wall of plugins, most of which want to add database tables, a settings page with forty options, a dashboard widget, and an upsell to their $29-a-seat cloud the moment you actually want to answer someone. You do not need any of that to put a chat bubble on your site. WordPress already gives you a clean hook to inject one line of JavaScript, and a hosted widget does the rest: a roughly 9 KB async script on the front, a shared inbox with AI on the back. No plugin sprawl, no per-seat pricing, no new tables in your database.

The right place is wp_head, not header.php

The instinct is to open Appearance, Theme File Editor, and paste the snippet into header.php before </head>. Do not. Editing a theme file directly means your change vanishes the next time the theme updates, and if you are on a page builder or a block theme there may not be a header.php to edit at all. WordPress has a purpose-built hook that fires inside the <head> of every page, on every theme: wp_head. Hook one function onto it and the widget is everywhere, permanently, whichever theme is active.

Step 1: grab your widget ID

Sign up for muro (14-day free trial, no charge today), create a site for your blog or store, and copy the widget ID from the install screen. While you are there, set the accent color, launcher position, agent name and avatar so the bubble looks like part of your theme, and pick from 12+ languages if your readers are not English-first.

Step 2: add the snippet on wp_head

You have two clean ways to hook onto wp_head. The no-code way, which I recommend for most sites, is a snippet manager like WPCode or Code Snippets: create a snippet, set it to run site-wide in the header, and paste the script. It survives theme changes and you can toggle it off without touching code. If you keep a child theme, the code way is a few lines in its functions.php:

php// functions.php (child theme)
add_action('wp_head', function () { ?>
  <script>
    (function(w,d,s,o){
      w.MuroChat=o;w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)};
      var j=d.createElement(s);j.async=1;j.src='https://muro.chat/widget.js';
      d.getElementsByTagName('head')[0].appendChild(j);
    })(window,document,'script','muro');
    muro('init',{widgetId:'YOUR_WIDGET_ID'});
  </script>
<?php });

Replace YOUR_WIDGET_ID, save, done. Every page rendered by WordPress now has chat: posts, pages, archives, the WooCommerce shop, all of it. The script loads async, so it never blocks your content or drags your Core Web Vitals.

Block themes and the site editor

On a block theme (Twenty Twenty-Four and friends) there is no header.php, and the Full Site Editor edits templates, not <head>. The wp_head hook still fires, so the snippet-plugin or child-theme functions.php approach above is exactly the same and is the correct path. You do not need a custom HTML block, and you should not paste raw <script> into a block, since the editor can strip or escape it.

Caching and JS optimizers

Point the AI at your docs

The install is the boring half. The half that saves you hours is the AI. Paste your help center or docs URL into muro and it reads the pages and drafts a knowledge base; from then on the widget answers most questions from your own content instead of pinging you. If you run WooCommerce, this is where shipping, returns and sizing questions stop reaching your phone, and the WooCommerce guide has the store-specific notes.

When you're offline, it becomes email

Small teams are not staring at an inbox all day, so muro falls back to email: anything the AI hands off is forwarded to your address, you reply from your mail client, and the reply lands back in the visitor's chat window as if you had been in the dashboard the whole time. Add a couple of saved replies and an automation rule and the whole support surface runs on minutes a day. There is a full REST API and webhooks too, so you can pipe conversations into Slack or your own admin, the API docs cover it.

Ship it

Create a site in muro, add the snippet on wp_head through a child theme or a snippet plugin, exclude it from your JS optimizer, and point the AI at your docs. It covers every theme and every page, it survives updates, and your readers get answers at 3 a.m. without another plugin in the list. Poke the widget in the live demo, then go add the hook.

✦ Frequently asked

Questions people ask.

01Will a live chat widget slow down my WordPress site or hurt my PageSpeed score?+

No, not if it loads async, and muro's does. The file is about 9 KB gzipped, is never render blocking, and stays out of your LCP path. It renders inside a Shadow DOM, so there is no CSS fight with your theme, and it adds no jQuery dependency, no database tables and no admin-side assets. Run PageSpeed before and after if you want proof.

02How much does it cost, and is there a free plan?+

muro is flat by project count: $19/mo Solo (2 projects) or $59/mo Fleet (unlimited projects), with unlimited agents on every plan, so a VA or a seasonal hire costs nothing extra. There is no free forever tier. The 14-day trial takes a card, charges nothing today, and cancels in one click before day 14. AI credits are included (1,000/mo Solo, 3,000 Fleet), or bring your own Anthropic key at zero markup.

03Is it GDPR compliant, and do I need to add it to my cookie banner?+

Data is EU-hosted, with a signed DPA and a public sub-processor list, so you can name muro as a processor in your privacy policy. The widget sets no cookies; it keeps a visitor id and the current conversation id in localStorage so a returning reader finds their thread. If your consent plugin gates scripts by category, wrap the wp_head snippet in that category's condition.

04The chat bubble isn't showing up on my site. What do I check?+

View source first and confirm the snippet is actually in the head. If it is missing, your snippet plugin is scoped to admin only or set to the footer. If it is there, open the browser console. A 403 origin_not_allowed means the origin you are on is not in the site's allowed origins list (www and non-www are different entries). A 404 means a wrong widget ID.

05Does it work with Elementor, Divi, WooCommerce and WordPress multisite?+

Yes to all four, because wp_head fires whatever renders the body: page builders, block themes, WooCommerce templates. On multisite you have two options. Paste the same widget ID network wide and every subsite feeds one inbox, or create one muro site per subsite for separate inboxes and separate AI knowledge, which counts against your project limit (2 on Solo, unlimited on Fleet).

06Can I hide the chat on specific pages, like checkout or a landing page?+

Yes, and the clean way is PHP rather than a widget setting. Put an early return inside the function you hooked onto wp_head, for example `if (is_page(array('demo','lp-spring')) || is_checkout()) return;` above the script tag. With WPCode you can use its conditional logic rules instead of code. Note that wp_head never fires in wp-admin, so the bubble already stays out of your dashboard.

✦ Try it

One support inbox for all your projects, one flat price.

muro is live chat, an AI that answers from your own docs, and a shared inbox for every site you run. See it both sides in the live demo, check the flat pricing, or see how muro compares. It's the same snippet on every platform, so you can browse every install guide.

Tm

✎ Written by

The muro team

muro.chat