brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wp core verify-checksums tells you if someone touched your WordPress files

WordPress
~/tips/tip-wordpress-core-verify-checksums

wp core verify-checksums

Compares your WordPress core files with the official list and reports anything changed or unexpected.

A security check that takes two seconds and needs no plugin.

WordPress.org publishes a checksum for every file of every release. wp core verify-checksums downloads the list for the version you run and compares it with what is on disk. It does not load WordPress for this, so a broken or infected site cannot get in the way.

wp core verify-checksums

When everything matches you get a success line. When a core file was changed or is missing, WP-CLI lists it. Add --include-root and it also warns about strange extra files in the root folder, which is where a lot of dropped malware ends up.

The caveat: if the check fails for files that look normal, the version or the language is probably wrong. The docs say to compare --version and --locale with what Dashboard, Updates shows. Say your site runs in Dutch, then --locale=nl_NL is the one to try.

This only covers core. Themes, plugins and your own wp-config are not in the list. I would run it after any update and whenever a site starts behaving oddly. A clean result does not prove the site is safe, but a dirty one is a clear answer.

Further reading: wp core verify-checksums (WP-CLI command reference), On this site: wp plugin verify-checksums –all checks every plugin against WordPress.org, On this site: wp db export – pipes a WordPress database dump straight into gzip, On this site: Guide: fix your WordPress file permissions without breaking the site

More WordPress tips wp user application-password create anna backup-script --porcelain define( 'MEDIA_TRASH', true ); wp cli check-update wp theme delete --all wp media image-size All WordPress tips (85) All topics

Link