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 version with the extra flag shows the WordPress database revision too

WordPress
~/tips/tip-wordpress-core-version-extra

wp core version --extra

Prints the WordPress version plus database revision, TinyMCE version and package language.

Plain wp core version prints one number. Add one flag and you get the details that matter when something looks off after an update.

wp core version --extra

The output has four lines: the WordPress version, the database revision, the TinyMCE version and the package language. The database revision is the interesting one. It is the schema version that the files on disk expect. WordPress stores its own idea of that number in the db_version option, and when the two differ, the dashboard asks you to update the database.

So when a site keeps showing the “Database update required” screen, I’d compare the two:

wp core version --extra
wp option get db_version

If the option is lower, wp core update-db brings it up. If it is higher, the files are older than the database, which usually means someone restored old files over a newer install.

One detail for multisite: the revision shown here comes from wp-includes/version.php, not from a subsite. For a subsite’s stored value, add --url with that site to the wp option get command.

Further reading: wp core version, wp core update-db

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