Safeguard
Security Guides•

How do you verify WordPress core files with wp core verify-checksums?

Run wp core verify-checksums to compare core files with WordPress.org's MD5 list, spot injected or edited files, and know what the command does not cover.

Safeguard Security Team
3 min read

Run wp core verify-checksums from the site's folder. WP-CLI downloads the MD5 checksums for your WordPress version from WordPress.org and compares them with the installed core files. A clean run prints a success line. Any changed or unexpected file is listed as a warning, and the command exits with an error.

What the handbook says it does

The WP-CLI handbook states that the command downloads md5 checksums for the current version and compares them against the installed files. For security it avoids loading WordPress while verifying, which matters because a compromised site cannot be trusted to report on itself. It also runs on the before_wp_load hook.

If verification fails unexpectedly, the handbook advises passing the locale and version values shown on the Updates screen in the admin area.

Steps

  1. Open a shell on the server and go to the site.
  2. Run the command with no options for a first check.
  3. If it fails, read each listed file. Core files such as wp-includes/version.php should not differ.
  4. For a stricter sweep, use the include-root option, which also checks the root directory and warns about items that are not part of WordPress.
  5. Exclude known harmless files with the exclude option, for example a customized readme.
wp core verify-checksums
wp core verify-checksums --format=json

Reading the result

OutputWhat to do
Success lineCore files match. Move on to plugins and themes
File does not verifyTreat as suspect. Compare with a fresh download of the same version
Unexpected file in the root (with include-root)Investigate who added it and why
Locale mismatch warningsRe-run with the locale and version from the Updates screen

Limits you should know

Core checksums only cover core. Most real compromises on agency sites arrive through plugins, themes, or stolen credentials, and a changed plugin file will not show up here. They also do not cover the uploads folder or the configuration file, where attackers often hide code.

Use it together with the plugin check described in our plugin checksum post, and with a regular inventory of what is installed.

The handbook also warns that the insecure option retries downloads without certificate validation if TLS fails, which makes the request vulnerable to a man in the middle attack. Leave it off.

When a check fails

Do not clean up first. Take a copy of the failing files and note timestamps, because they tell you when something changed and help you decide whether it was an edit by a person or an intrusion. Then replace core with a fresh download of the same version, which is safe because core should hold no custom code. Reset credentials for the site, check for new administrator accounts, and review plugins, themes and the uploads folder, since the core check does not look there.

A failure on a single documentation file such as the readme is often harmless, but confirm that rather than assume it.

Quick check

Does a passing core check mean the site is clean?

No. It only shows core files are unmodified. Plugins, themes, uploads and the database are separate.

Why does it avoid loading WordPress?

So that a tampered site cannot interfere with its own check.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.