Blog
SavedSearch
Visit Hostlelo

WP-CLI Verify Checksums: Check WordPress Core and Plugin Files

An update does not prove your files are clean. Check WordPress core and plugins against WordPress.org checksums with WP-CLI, then fix failures safely.

The short answer

WP-CLI checksum commands compare core and supported plugin files with WordPress.org without repairing them. Investigate failures and back up first. For a same-version repair, pin the verified core version and locale or the plugin version; plan upgrades separately and recheck afterward.

Website file cards pass through a checksum grid and magnifying glass to a green check, illustrating trusted file verification.
Reading options

On this page

An update replaces WordPress files, but it does not prove that every file on your server is now clean. Two WP-CLI commands, wp core verify-checksums and wp plugin verify-checksums --all, compare covered core and WordPress.org plugin files with official copies and identify mismatches. You can run them from cPanel Terminal or SSH. The comparison commands do not repair files, but the plugin command normally boots WordPress and can execute site code. If compromise is suspected, stop and have your host or responder inspect a preserved copy in a trusted environment.

Here is the context. WordPress 7.1.3 came out on 6 October 2026, and at the time of writing (18 October 2026) its release post lists 7 security fixes and 4 bug fixes. Sites with automatic background updates started updating on their own. That is good news, but an update only writes the files it ships. A file that someone changed or added before the update can still be sitting there afterwards.

By the end of this guide you will be able to run both checks, read every kind of result, and fix a failed check safely, with a full backup taken first.

What a checksum check actually is

A checksum is a short fingerprint calculated from a file's contents. Change one character in the file and the fingerprint changes completely.

WordPress.org publishes the fingerprints of every official core file for each version and language. The WP-CLI documentation describes the core command in one line: it "Verifies WordPress files against WordPress.org's checksums." WP-CLI downloads the list, calculates the fingerprints of your files, and compares them one by one.

Think of it like checking a delivery against the packing list from the shop. The shop's list says what should be in the box. If something in the box does not match the list, or there is something extra, you know before you start using it.

The core checksum command runs before WordPress is loaded, avoiding normal WordPress bootstrap while comparing core files. This does not make an untrusted WP-CLI configuration, PHP environment or host safe. The plugin checksum command has different loading behaviour, explained below.

There is one limit to keep in mind. The checksums only cover files that WordPress.org ships. Your theme customisations, your uploads and your settings are not on the packing list, so the tool cannot judge them.

Before you start

The checksum comparisons do not intentionally modify the checked files. That is not a guarantee that invoking WP-CLI has no side effects: the plugin check normally loads WordPress, and local WP-CLI configuration can load code. If you suspect compromise, use a host-led inspection of a preserved copy rather than booting untrusted code on production. Repair steps also write files and require the backup below.

  • Shell access: cPanel Terminal or an SSH login. Your host must enable the SSH Access & Terminal feature for your account.
  • WP-CLI installed. Many hosts include it. If not, you will install it in Step 2.
  • PHP 7.2.24 or later on the command line, which WP-CLI requires.
  • The path to your WordPress folder, for example ~/public_html or ~/public_html/blog.
  • A fresh full backup before any fix. Step 1 shows how.
  • Allow time for downloads, the number of installed plugins, investigation and recovery. No fixed duration applies to every site.
  • The checksum comparisons are read-only. Repair commands overwrite files and need a tested backup, a trusted version/locale record and a rollback plan.

Quick tip: if you plan to use SSH regularly, set up key login instead of passwords. Our guide on SSH key login for cPanel hosting walks you through it.

Run the checks step by step

Step 1: Take a full backup first

The comparisons do not repair checked files, while the troubleshooting commands overwrite them. Take and verify the backup before repairs; if compromise is suspected, preserve evidence and arrange trusted inspection before invoking site code.

In cPanel, find Backup Wizard (use the search box at the top of cPanel if you do not see it). Click Back Up, choose the full backup, set Home Directory as the destination, enter your email for a notice, and click Generate Backup. When it finishes, download the file from the Download section to your computer.

Heads up: the cPanel documentation says "You cannot automatically restore a full backup file in cPanel." A full restore needs your host, through WHM. For a quick self-service safety net, also take two partial backups in the same wizard: Home Directory (a .tar.gz file) and MySQL Databases (a .sql file). Those can be restored from cPanel yourself.

If you prefer a manual copy, download your WordPress folder over SFTP and export the database. Either way, keep one copy off the server. Our guide on backing up a cPanel site with an offsite copy and a test restore covers the full routine.

What you should see: a backup file in the Download list with today's date, and the same file saved on your computer.

Step 2: Open Terminal and make sure WP-CLI works

In cPanel, open Terminal and read its warning before proceeding. Routine checks and file-repair commands have different risks; do not treat the whole guide as read-only. Stop if you cannot verify the WordPress path or if untrusted site code may execute.

This command moves you into your WordPress folder and prints WP-CLI's details. Change public_html if WordPress lives somewhere else.

cd ~/public_html
wp --info

What you should see: a few lines of details, including one that starts with WP-CLI version:. If you see wp: command not found instead, WP-CLI is missing. Install it with the official Phar method below.

This downloads the WP-CLI Phar file (a single PHP archive that contains the whole tool) into your home folder and tests it.

cd ~
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info

The official handbook then makes it executable and moves it to /usr/local/bin/wp with sudo. On shared hosting you normally do not have sudo. Our suggestion, which is not from the handbook: keep wp-cli.phar in your home folder and run it as php ~/wp-cli.phar wherever this guide says wp. Test it once with php ~/wp-cli.phar --info before you rely on it.

Step 3: Verify the WordPress core files

This command compares every core file in wp-admin, wp-includes and the root wp-* files with the official checksums for your installed version.

cd ~/public_html
wp core verify-checksums

What you should see on a clean site is exactly one line:

Success: WordPress installation verifies against checksums.

A failed check looks like this. Each Warning names a file, and the final Error line tells you the overall result.

Warning: File doesn't verify against checksum: wp-includes/version.php
Error: WordPress installation doesn't verify against checksums.

Step 4: Verify the plugins

This command compares installed plugins with checksums available for their versions on WordPress.org. Unlike the core checksum command, it normally loads WordPress. The global --skip-plugins and --skip-themes options can reduce ordinary plugin/theme loading, but must-use plugins still load, so these flags are not a safe sandbox for a suspected compromise.

wp plugin verify-checksums --all

What you should see is a success line that counts your plugins, like the example in the documentation:

Success: Verified 8 of 8 plugins.

If a plugin fails, WP-CLI lists the problem files, each with a message such as Checksum does not match or File was added, and the run ends with an error instead of the success line.

Quick tip: the default is --format=table. If you want to save the results or send them to a developer, --format=json or --format=csv gives cleaner output. If you want the strictest check, add --strict, which also treats small edits such as changes to readme.txt as errors.

Step 5: Look for unexpected files in the root folder

By default the core check only looks at WordPress files. The --include-root option adds every file and folder in the root of your WordPress install and warns about anything that is not part of WordPress.

wp core verify-checksums --include-root

What you should see: the usual success line, or warnings for extra items. Do not panic at the first warning. Many sites have legitimate extras in the root, such as a Google verification file or a .well-known folder. Read each name and decide if you recognise it. The troubleshooting section below explains how.

The complete command block

This is the routine command block for a site you trust to boot. It compares files rather than repairing them, but the plugin command can run site code during WordPress loading. For a suspected compromise, ask your host or responder to inspect a preserved copy in a trusted environment instead. Replace ~/public_html with your verified WordPress path.

cd ~/public_html
wp --info
wp core verify-checksums
wp core verify-checksums --include-root
wp plugin verify-checksums --all

If you use the Phar file from Step 2 instead of an installed wp, the same block looks like this.

cd ~/public_html
php ~/wp-cli.phar --info
php ~/wp-cli.phar core verify-checksums
php ~/wp-cli.phar core verify-checksums --include-root
php ~/wp-cli.phar plugin verify-checksums --all

A verification routine after every update

Put this on a list and run it each time WordPress or a plugin updates, whether you clicked Update Now or the update ran on its own.

  1. Open Terminal in cPanel, or log in over SSH.
  2. Run the command block above.
  3. If every line says Success, you are done. Note the date somewhere.
  4. If anything fails, stop. Do not delete files yet. Take the backup from Step 1 if you do not already have today's copy.
  5. Copy the full output into a text file so you have a record of what failed.
  6. Work through the matching entry in the troubleshooting section.
  7. Run the command block again until it is clean.

Why this matters: automatic updates are a good habit, and we recommend them. They work best with a backup plan around them, which our guide to WordPress auto-updates with a safe backup plan explains. The checksum routine confirms whether the files it covers match the selected official releases. It does not scan uploads, themes, wp-config.php or plugins without WordPress.org checksums, and a clean result is not a malware clearance.

Made-up example: Amira runs a small bakery site. Her host auto-updated WordPress overnight. In the morning she runs the block. Core passes. One plugin, a contact form, shows File was added for a file called cache-helper.php. She did not add it, and the plugin's official package does not include it. She saves the command output, takes an off-server backup, and asks her host to investigate how the file arrived before a verified, pinned repair. A fresh check may then show Success. That result covers the repaired plugin only; she and her host still investigate other files, accounts and the entry path. They rotate credentials from a trusted device after containing and cleaning the site, and repeat rotation if exposure continued.

How to check it worked

After any fix, prove it with the same tools. Each check below has a clear expected result.

  • Run wp core verify-checksums. Expected: Success: WordPress installation verifies against checksums.
  • Run wp plugin verify-checksums --all. Expected: a Success: Verified line where both numbers match, for example 8 of 8.
  • Run wp core verify-checksums --include-root. Expected: success, or only warnings for items you have identified and decided to keep.
  • Open your site in a private browser window. Expected: the home page loads normally, and you can log in to /wp-admin/.
  • In WordPress, go to Dashboard > Updates. Expected: the version and language match what you verified against.

If the plugin numbers do not match (for example 7 of 8), scroll up in the output. One plugin was skipped or failed, and the warning above the summary tells you which.

Troubleshooting

A core file fails the checksum

Symptom: Warning: File doesn't verify against checksum: followed by a path in wp-admin or wp-includes, then Error: WordPress installation doesn't verify against checksums.

Likely cause: the file was edited. Sometimes that is a developer who changed core directly (a bad practice, but common). Sometimes it is malware. Either way, an official core file should never differ.

Fix: take the backup first and establish the intended core version and package locale from trusted release/deployment records. Downloading another version or locale is a separate change. The illustrative command below uses version 7.1.3 and British English; replace both with your verified values. It has not been executed on your site.

wp core download --version=7.1.3 --locale=en_GB --skip-content --force

Re-run core verification using the same explicit version and locale. If that localized package is unavailable, stop and choose the correct official package with your administrator instead of silently switching languages.

The documentation says --force "Overwrites existing files, if present." Run wp core verify-checksums again afterwards. If the same file fails again right away, something on the server is rewriting it, and it is time to call your host.

You might also see a warning saying File should not exist for an extra file inside wp-admin or wp-includes. That file is not part of the official release. Do not open or execute it. Preserve its path, timestamps and a restricted evidence copy, then ask your host or incident responder to assess it before removal; deleting it immediately can erase evidence while leaving the entry path open. Re-run checks after the agreed repair.

What about wp-config.php and edits to my theme?

Symptom: you edited your theme or wp-config.php and expected the check to complain, but it did not.

Likely cause: this is normal. Looking at the WP-CLI source code, the core check skips everything under wp-content and excludes wp-config.php. Your themes, uploads and settings file are yours, so there is no official fingerprint for them.

Fix: nothing to fix, but know the limit. A clean core result does not prove your theme or wp-config.php are clean. For a theme from WordPress.org, compare it with a fresh download. For wp-config.php, open it and look for code you do not recognise, especially long scrambled lines near the top or bottom.

A plugin cannot be checked

Symptom: a warning such as Could not retrieve the checksums for version 2.4.1 of plugin example-plugin, skipping. and a summary where the numbers do not match.

Likely cause: the plugin is not hosted on WordPress.org. Premium plugins, plugins bought from a marketplace and custom plugins have no published checksums there. This is our inference from how the command works; the documentation does not say it in words. It can also happen with a very old version that WordPress.org no longer lists.

Fix: for that plugin, ask the vendor how they publish file hashes, or reinstall it from a fresh copy downloaded from your account on the vendor's site. You can skip it in future runs so the output stays readable with --exclude.

wp plugin verify-checksums --all --exclude=example-plugin

If a WordPress.org plugin fails with Checksum does not match or File was added, preserve evidence and take a backup before repair. Establish the intended installed version from trusted inventory or deployment records. Do not rely on a potentially modified plugin header as your only version record.

For a same-version repair, pin --version. Without it, WP-CLI fetches the stable release, so an apparent repair can also upgrade the plugin. The following example is illustrative and unexecuted: replace example-plugin and 1.2.3 with the real slug and verified installed version. Do not paste an invented version into production.

wp plugin install example-plugin --version=1.2.3 --force
wp plugin verify-checksums example-plugin

The force option overwrites the installed copy without a confirmation prompt. If the required version is unavailable or has a security advisory, stop and plan a supported upgrade separately, including compatibility tests and database rollback. Preserve custom files and settings in the backup. Passing checksums after repair does not establish how an unexpected file arrived or prove that the rest of the site is clean.

The locale or version does not match

Symptom: several files fail at once, often wp-includes/version.php, readme.html and wp-config-sample.php.

Likely cause: WP-CLI compared your files against the wrong language or version. The documentation shows this exact set of warnings when --locale=ja is used on a site that is not Japanese.

Fix: go to Dashboard > Updates and note the version and language. Then pass both values. This example checks a British English site; replace the values with yours.

wp core verify-checksums --version=7.1.3 --locale=en_GB

If only readme.html fails because you or your host removed or changed it on purpose, you can skip that one file with --exclude="readme.html", the same way the documentation does.

An unknown file in the root with --include-root

Symptom: wp core verify-checksums --include-root warns about a file or folder that is not part of WordPress.

Likely cause: this can be harmless or not. Common harmless items are search engine verification files, a .well-known folder used for SSL validation, or an old .zip backup someone left behind. A random PHP file name you have never seen is a different story. Note that, in the source code, .htaccess, .maintenance, wp-config.php and wp-content are already excluded from this warning.

Fix: identify each extra item and its owner before changing it. Move an old downloadable backup out of the web root to private storage. For an unknown PHP file, do not run or casually download it; document the path and timestamps, preserve a restricted evidence copy, and contact your host or incident responder. Contain and investigate the possible compromise before deleting or replacing files. After a trusted cleanup, verify checksums again and rotate affected credentials.

wp: command not found in Terminal

Symptom: wp: command not found (or bash: wp: command not found).

Likely cause: WP-CLI is not installed for your account, or it is installed somewhere that is not on your PATH (the list of folders the shell searches for commands).

Fix: ask your host whether WP-CLI is available, or follow Step 2 to download wp-cli.phar and run it with php ~/wp-cli.phar. If php itself is not found or reports a version below 7.2.24, ask your host which PHP binary to use on the command line.

The check fails with a TLS or download error

Symptom: WP-CLI cannot download the checksum list and mentions a failed TLS handshake.

Likely cause: an outbound network or certificate problem on the server.

Fix: do not add --insecure. The documentation warns that it retries the download without certificate validation, which makes the request vulnerable to a man-in-the-middle attack. That would defeat the whole point of a security check. Ask your host to fix outbound HTTPS from the server, then run the check again.

Security notes and when to ask for help

A checksum failure is a clue, not a verdict. A developer's old edit and a hacked file look the same in the output. What tells them apart is whether you can explain the change.

Heads up: an added PHP file in core or a plugin is a possible compromise, not proof that a simple reinstall makes the site safe. Record the indicators, involve your host or a qualified responder, investigate the entry path and other files/accounts, then repair from trusted packages. Rotate affected WordPress, hosting and SFTP credentials from a trusted device after containment; if you change the database user password, coordinate the matching wp-config.php update to avoid an outage. Remove unauthorized admin accounts as part of a reviewed recovery plan.

Ask your host or a developer when a file comes back after you replaced it, when you see failures in many plugins at once, or when the site breaks after a reinstall. Send them the saved output from the routine; it saves everyone time.

Quick tip: only reinstall from WordPress.org or from your plugin vendor's own site. A plugin or WordPress zip from a random download site cannot be trusted, even if its name looks right.

The one message worth forwarding

Copy this to your developer, your host or the person who manages the site:

"Hi, after each WordPress update, could you please run these from the WordPress folder and send me the output: wp core verify-checksums, wp core verify-checksums --include-root and wp plugin verify-checksums --all? If anything fails, please save the output and take an off-server backup before changing anything. Investigate unexpected added or changed files and preserve evidence before any deletion. After confirming the intended version and a safe recovery plan, reinstall the affected files from WordPress.org using the verified installed version and package locale for core (wp core download --version=<our-version> --locale=<our-locale> --skip-content --force), or a verified pinned plugin version (wp plugin install <plugin> --version=<installed-version> --force), and run the checks again. A pass covers only checked files, not the whole site. Please do not use --insecure. Thanks."

After an update, checksum checks compare covered files with the expected WordPress.org package data. Review skipped packages, warnings and unexpected files; a pass does not establish that the whole website is safe.

Reader questions

Do the checksum commands change any files on my site?

The comparisons do not repair the checked files. However, the plugin checksum command normally loads WordPress, which can execute site code and have side effects; local WP-CLI configuration can also load code. For suspected compromise, arrange trusted inspection of a preserved copy. Repair commands such as wp core download --force overwrite files.

Does a clean core check mean my whole site is clean?

No. It compares covered core files with expected checksums for the selected version and locale. Plugins, themes, uploads, wp-config.php, the database and server state are outside a core checksum pass. Extra-file warnings and skipped checks also need review.

Can I check premium plugins this way?

Usually not. The plugin check needs checksums published on WordPress.org, so plugins sold elsewhere are skipped with a warning. Ask the vendor how to verify their files or reinstall from a fresh copy from your account.

How often should I run these checks?

Run them after WordPress or plugin updates, including automatic updates, and investigate unexpected results. Duration depends on the site, connectivity and any recovery work.

Is it safe to use the --insecure option if the download fails?

No. The WP-CLI documentation warns that it skips certificate validation and makes the request vulnerable to a man-in-the-middle attack. Ask your host to fix outbound HTTPS instead.

Do I need SSH to run WP-CLI on shared hosting?

You need shell access, but not necessarily a separate SSH client. If your host enables SSH Access and Terminal for your account, you can use the Terminal inside cPanel.

Sources & further reading

  1. WordPress 7.1.3 Maintenance and Security Release
  2. WP-CLI: wp core verify-checksums
  3. WP-CLI: wp plugin verify-checksums
  4. WP-CLI: wp core download
  5. WP-CLI: wp plugin install
  6. WP-CLI Handbook: Installing
  7. cPanel Docs: Terminal for cPanel
  8. cPanel Docs: Backup Wizard
  9. WP-CLI source code: core checksum command
  10. WP-CLI source code: plugin checksum command

What changed

Removed fixed completion-time claims, clarified the limited meaning of a checksum pass, and aligned the title with core and plugin verification. Existing backup and trusted-inspection safeguards remain.

Originally published . About our editorial updates.

Your next project deserves a better foundation.

Explore hosting built for your next chapter.

Explore hosting

Find your next answer.

Search published guides and articles.

Ctrl / ⌘ K to open · Esc to close