WP-CLI v2.12 Has Been Released

It’s been a while since we’ve blogged about WP-CLI, but a new version was released just today, on May 7, 2025. There are some cool new command line tricks to discover, so here’s what’s new!

Currently the available WP-CLI version is 2.11 at Seravo, but as we keep your WordPress and all server software updated for you, the version 2.12 will become available soon. If you want to find out which version is active on your site, simply connect and log in with SSH and run the following command:

$ wp cli version

Introduction to WP-CLI

Why use WP-CLI? We get it, admin tasks for a WordPress site can be tedious when you have to repeat them on a daily basis and on multiple sites. Using WP-CLI commands is often faster and gives you more options than clicking around in the WP admin dashboard.

There are also plenty of commands that are more precise for certain situations that WordPress developers may face. Using WP-CLI unlocks many features that you wouldn’t be able to access in the graphical user interface of WordPress. For example, these features include database management, getting more detailed and structured information for scripting, working with transients or cron events, and much more.

So, WP-CLI allows you to manage WordPress installations and site content easily and effectively. If you’re only getting started, have a look at our previous blog post to learn some helpful, basic WP-CLI commands. Looking for a list of all available commands for WP-CLI? Documentation and guides can be found on developer.wordpress.org.

Use WP-CLI Over SSH

To be able to send WP-CLI commands to your WordPress installation, an SSH connection is needed. At Seravo, each hosting plan includes a secure SSH (and SFTP) connection to your site, and the credentials have been sent when your order was delivered. See more instructions on our knowledge bank, or watch a video on our YouTube channel to learn how to form an SSH connection. You can also get in touch with us if you need additional help with your site!

Please accept cookies statistics, marketing to see this content

WP-CLI v2.12

The compatibility between PHP and WP-CLI gets bumped into PHP 8.4 in version 2.12. Currently PHP 5.6 is the minimum, but according to the release notes, PHP 7.2 will become the new minimum requirement in the future. Seravo is dropping the support for PHP 7.4 at the end of 2025, so we recommend checking which version your site is currently using, and updating it into a newer, more secure one.

What’s New?

Aside from fixes to bugs and improvement with compatibility, 2.12 has plenty of cool new features that makes working with WP-CLI even more versatile.

Caches and Transients Now Support ‘Pluck’ and ‘Patch’ Commands

With $ wp transient pluck and $ wp transient patch, you can now pluck and patch individual entries in arrays containing temporary, cached data on a WordPress site.

Filter Post Lists in More Detail with Complex Query Flags

You can now list WordPress posts according to very detailed filters. Instead of asking WP-CLI to only list posts in a certain category, you can now list posts in more detail by including tags or list posts that have been published after a certain date.

$ wp post list --field=post_title --date_query='{"before":{"year":"2024"}}

Post Meta Can Be Forced to Only Return a Single Value

With the new –single flag, it is now easier to work with specific pieces of postmeta information in your scripts or commands, as you get exactly what you need without extra clutter.

$ wp post meta get <postID> <meta_key> --single

Exclude Files from Core Checksum Verification

The $ wp core verify-checksums command checks for problems in your WordPress installation, verifying that the core files have not been edited.

$ wp core verify-checksums
Success: WordPress installation verifies against checksums.

While editing the core files should never be necessary, the new --exclude flag makes the command more precise, ignoring warnings for files you know are intentionally different.

$ wp core verify-checksums --exclude='readme.html'
Success: WordPress installation verifies against checksums.

Bonus tip: A helper command $ wp-fix-checksums exists at Seravo, which automatically reinstalls your WordPress files, ensuring the security of your installation. Read more in developer documentation.

WP-CLI Now Supports Plugin & Theme Minimum Requirements

When creating a plugin or theme for WordPress, its developers can include information about what are the minimum required WP core and PHP versions. WP-CLI can now understand these requirements, and might give you a warning or prevent the installation if the requirements are not met.

This also introduces the new requires and requires_php fields to the output of the $ wp plugin list command.

New Flags for `make-json` Generation

The command $ wp i18n make-json gets new flags, --domain and --extensions, making it more powerful.

Force Update Checks When Listing Plugins or Themes

When listing plugins or themes with WP-CLI (commands $ wp plugin list or $ wp theme list), you may have noticed that the listing does not show information about an update, even though one may have been published. With the new --force-check flag, you can tell WP-CLI to check the situation in the plugin repository right now, instead of showing the results from the last time WordPress did its automatic check.

Release Notes for WP-CLI v2.12

As always, you can find the release notes for WP-CLI version 2.12.0 on WordPress.org. You can also skip right into the detailed changelog, if you prefer. Until next time! May your code be clean and deployments smooth.