Skip to main content

WordPress

Add Monitoring to a self-hosted WordPress site by putting the script in your page head.

On this page

Self-hosted WordPress has no single "add a script" screen. A code-snippets plugin works on any theme; editing your theme file directly only works if your theme has one.

Before you start

You'll need either an Administrator account and the ability to install a plugin, or — if you'd rather edit your theme directly — a classic (non-block) theme with a header.php file. Block themes, the default since Twenty Twenty-Two, don't have one, so use a plugin instead. If you edit a classic theme's files, use a child theme (opens in a new tab) — plain theme edits are overwritten the next time the theme updates.

Add the script

  1. Install a code-snippets plugin

    The route that works on any theme: install a code-snippets plugin that can insert code into the page head — WPCode (opens in a new tab) is one that does this.

  2. Paste the script

    HTML
    <script src="https://accessible.so/a11y/loader.js" data-site-key="acc_rum_YOUR_SITE_KEY" async></script>

    Replace acc_rum_YOUR_SITE_KEY with your site's own key — copy the snippet from your domain's Monitoring page, which already carries it. Paste it into your plugin's header field — or, on a classic theme, into your child theme's header.php, just before </head>.

  3. Save

    Save your changes. A plugin applies the change immediately; a theme file edit takes effect the next time the page is requested.

Check it's working

See Debugging to confirm the script is reporting.