skip to Main Content

Simple question:

Is there an API endpoint to retrieve the version of a specific WordPress site?
I need to monitor different WordPress sites and want to retrieve the version of these sites to be collected and checked for WordPress updates.

Is there a simple solution, something like example.com/api/version ?

2

Answers


  1. Chosen as BEST ANSWER

    I found a solution:

    checking the content of the /wp-admin/upgrade.php file. It contains link tags with specific ?ver=x.x.x suffix that correspinds to the wordpress version.


  2. WordPress does not provide built-in Api endpoint like example.com/api/version to directly retrieve the version of site. But you can try these method:

    1. Check the readme.html file most wordpress have readme.html file in the root directory tha shows the version of wordpress. You can access by example.com/readme.html this file page contain version of wordpress

    2. Use the wp-json REST API: You can use the WordPress REST API to get general site information. While it does not directly return the version number, you can find it with: example.com/wp-json/ Some security plugins may block this API or limit its information.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search