How to Add Live Chat to WordPress (Without Slowing It Down)
You don't need a special WordPress chat plugin. Paste one line of code into your footer — here are three ways to do it, and how to check it works with caching on.
To add live chat to WordPress, paste the chat widget's code into your site's footer, just before </body>. The safest way is a small "header and footer code" plugin, so a theme update never removes it. The whole job takes about five minutes, and you don't need a dedicated chat plugin.
This guide uses SealReply as the example, and covers the three common setups: a code plugin, a classic theme, and a block theme. For other platforms, see How to add live chat to your website.
What you need
- An administrator account on your WordPress site.
- On WordPress.com, a plan that allows plugins or custom code. Self-hosted WordPress (WordPress.org) has no such limit.
- A free SealReply account. The free plan has no time limit.
Step 1: Add your site and copy the code
- Sign up. The console opens Set up your chat.
- Under Your website, enter a Site name and your Website address, for example
shop.example.com. Click Continue. - On Install the widget, choose WordPress under Your website runs on, then click Copy.
The code looks like this:
<script src="https://cdn.sealreply.com/widget.js" data-site-key="sk_…" async></script>
Keep the setup page open in a tab. It checks your site every few seconds and tells you when the chat has loaded.
Step 2: Paste the code into WordPress
Pick one of the three options below. Use only one; pasting the code twice can show two chat buttons.
Option A: a footer code plugin (recommended)
This works with every theme, and survives theme updates and theme changes.
- In WordPress, go to Plugins → Add New, search for WPCode, then install and activate it.
- Go to Code Snippets → Header & Footer.
- Paste the code into the Footer box.
- Click Save Changes.
Any plugin that adds code to the footer works the same way. If you already have one, use that.
Option B: a classic theme's footer.php
Only use this if you are comfortable editing theme files.
- Make sure you're using a child theme. If you edit the parent theme, the next update deletes your change.
- Go to Appearance → Theme File Editor and open
footer.php. - Paste the code just before
</body>. - Click Update File.
Option C: a block theme
Block themes, such as the recent default WordPress themes, have no footer.php. The Site Editor can't add a script to every page either. Use Option A.
Step 3: Clear your cache
Most WordPress sites run a caching plugin or a CDN. Until the cache is cleared, visitors — and the setup page — keep seeing the old page without the chat.
- Clear the cache in your caching plugin, and in your CDN if you use one.
- If your caching plugin has a delay JavaScript or combine JavaScript option, the chat may only appear after a visitor scrolls or clicks. If that's not what you want, add
widget.jsto that option's exclusion list.
The widget is about 38 KB and loads asynchronously, so it doesn't block your page from showing. You don't need to delay it to keep the site fast. If you still prefer it to load last, tick Load the chat after the page on the install step and copy that version of the code.
Step 4: Verify your domain
The widget stays hidden until you prove the domain is yours, so nobody can put your chat on a site they don't own. On WordPress, either option works:
- DNS TXT record: add it at your domain registrar or DNS host.
- File: upload the small text file to the address shown. With FTP or your host's file manager, this is often quicker.
Then click Check now. You do this once per site.
Step 5: Send a test chat
- On the setup page, click Open my website. The chat opens by itself.
- Send a message as a visitor.
- Reply from the console.
Test chats don't count toward your monthly chats and are left out of reports.
If the chat doesn't appear
| What the console says | Likely cause on WordPress |
|---|---|
| Not detected yet | The page is still cached, or the snippet wasn't saved. Clear every cache layer and reload. |
| Verify your domain first | Finish Step 4; DNS can take a few minutes. |
| Loaded on a different domain | You opened www. and added the address without it, or the other way round. Add both under Edit allowed domains. |
Also check that a security or "cookie consent" plugin isn't blocking scripts from other domains. If your site sends a Content Security Policy, allow the addresses listed in the widget documentation.
Hide the chat where it doesn't belong
You may not want the chat on your login page, a thank-you page, or a page that sells nothing. In the console, open Sites → your site → Page rules, and under Pages without the chat click Add a page. The chat button doesn't appear there, and visits to those pages aren't recorded.
What next
- Make it look like your site: logo, colour and greeting under Look and Texts, with a live preview.
- Set business hours: outside them, visitors leave a message instead of waiting.
- Turn on push: hear about new chats on your phone with the console closed.
Read more: How to never miss a customer when you're offline.