fbpx

WP-CLI v2.1 released

Written: 21.12.2018

Access to great developer tools is a key feature on our WordPress platform. Therefore we are excited about this new WP-CLI v2.1 release which brings some interesting improvements.

Improvements to i18n

There has been multiple improvements to wp i18n make-pot which, for example, can now also parse JavaScript in addition to PHP files and with wp i18n make-json you can create separate JSON files which then is used for the JavaScript i18n translations that were introduced in WordPress 5.0.

Smarter partial prompting

The global parameter --prompt is great if you don’t remember the arguments for a command and can also be used to build more user friendly scripts.

Previously though it would either prompt you for all arguments or the arguments you set it to prompt for, but from this release it will skip those arguments that were already provided in the command. This means you can have some arguments already set but prompt for the remaining arguments.

# Create user with some arguments set
$ wp user create johanfalk johan@seravo.com --prompt=role,user_pass,first_name,last_name
1/13 [--role=<role>]: administrator
2/13 [--user_pass=<password>]: MargaretThatcheris100%sexy
8/13 [--first_name=<first_name>]: Johan
9/13 [--last_name=<last_name>]: Falk
Success: Created user 16.

List current transients

You can now list the current transients on your site or network using wp transient list. The command can also use options such as --search to only include specific transients or --exclude if there are certain transients you don’t want to show in the list.

# List all transients that start with seravo
$ wp transient list --search=seravo* --human-readable
+---------------------+-------+------------+
| name                | value | expiration |
+---------------------+-------+------------+
| seravo_notification |       | 45 minutes |
+---------------------+-------+------------+

Continue reading

To catch up on all changes go read the full WP-CLI 2.1 release post and as always the WP CLI documentation is a great resource to learn more about all available commands.

Available for all Seravo customers

We have already started rolling out this to all our customers and is of course default on all new installs. If you are curious about other developer tools that is available, please read more at our WordPress Developer Documentation.

Leave a comment

Johan Falk

Search Seravo.com

Categories

More reading

Not the House, but the People

22.6.2020

Co-working is becoming the new norm that brings many benefits for an entrepreneur. You do not need to worry about […]

Aki Björklund Joins the Seravo Board

12.6.2020

Aki Björklund, one of the pioneers in the Finnish WordPress scene, has joined the board of Seravo. Aki has a […]

Visit us at the entirely online WordCamp Europe 2020

5.6.2020

WordCamp Europe is the world’s largest WordPress conference and we at Seravo have been an active participant in many ways […]