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 plugin verify-checksums --all checks every plugin against WordPress.org

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

wp plugin verify-checksums --all

Checks the files of every installed plugin against WordPress.org and lists any that do not match.

Core is not where most WordPress sites get hurt. Plugins are. So I like that the same checksum trick works there too.

Plugins hosted on WordPress.org have published checksums, and WP-CLI can compare your installed files against them. One command covers all of them.

wp plugin verify-checksums --all

You get a table with a line for each plugin that fails, and a count of how many were verified. For a single plugin, name it: wp plugin verify-checksums akismet. By default small things such as an edited readme.txt are ignored. Add --strict if you want those flagged too.

A plugin file with changed contents that you did not edit yourself is the thing to look for. Reinstall the plugin, and find out how the file got changed.

The caveat is that this only works for plugins that WordPress.org knows. Premium plugins and anything you installed from a zip have no checksum to compare with, so they show up as errors or are skipped. A failure on those says nothing about the plugin itself, only that the tool has no checksum to compare it with. Also, anyone who legitimately patched a plugin will see it flagged. I would treat the output as a list of things to look at, not a verdict.

Further reading: wp plugin verify-checksums (WP-CLI command reference), On this site: wp core verify-checksums tells you if someone touched your WordPress files, On this site: wp option list –autoload=on –format=total_bytes shows what every page load drags along

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