---
title: "Install on WordPress"
description: "Install XPmetric on WordPress with the free WPCode plugin or by editing header.php in a child theme."
source: "https://xpmetric.com/docs/install/wordpress"
---
WordPress sites can add XPmetric without editing theme files manually — the free WPCode plugin is the easiest path.

<TokenCallout />

## Tracking snippet

<TrackingSnippet />

## WPCode plugin (recommended)

1. In WP admin, go to **Plugins → Add New** and search for **WPCode**.
2. **Install** and **Activate** the plugin (free tier is enough).
3. Open **Code Snippets → Header & Footer**.
4. Paste the snippet into the **Header** box.
5. Click **Save Changes**.

## Manual (header.php)

1. Go to **Appearance → Theme File Editor**.
2. Open `header.php` in a **child theme** (so theme updates don't overwrite your change).
3. Paste the snippet just before `</head>`.
4. Save the file.

## Verify

Visit your homepage and any post URL. Check the XPmetric dashboard live feed for new pageviews.

## Related

- [CSP troubleshooting](/docs/troubleshooting/csp) if tracking stays silent
- [Custom goals](/docs/custom-goals) for form signup events

