↑ ↓ select, Enter open, Esc close

Get the latest WordPress version from the API

user@server
curl -s https://api.wordpress.org/core/version-check/1.7/ | jq -r '.offers[0].version'

Fetches the version check from api.wordpress.org and prints only the version number of the first offer, which is the current stable release. Together with wp core version, this quickly shows whether an installation is lagging behind. It is also an example of how JSON from curl can be parsed directly with jq.

Note: The -s option suppresses curl’s progress meter, which would otherwise clutter the output.

Also searched as

  • get latest wordpress version command line
  • is wordpress up to date
  • parse curl json output with jq

Related one-liners

All in Text processing

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.