2

I'm trying to make a script (bash) that examines all WordPress installations on my server and returns a set of information. I would need to know the latest known version of WordPress (official repository), can you do it via WP-CLI? or is there another way (API...)?

(I'm looking for a WP-CLI solution)

1

wp core version displays your current WordPress version.

$ wp core version
5.2.4

Adding --extra shows extended version information.

$ wp core version --extra
WordPress version: 5.2.4
Database revision: 44719
TinyMCE version:   4.940 (4940-20190515)
Package language:  en_US

wp core check-update lists the most recent versions when there are updates available, or success message when up to date.

$ wp core check-update --field=version
5.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.