WP-CLI v2.1 released

Written: 21.12.2018 Updated: 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

Fun times at WordCamp Nordic

15.3.2019

If you have any connection with the WordPress community in Finland it was hard to miss the first ever pan-Nordic […]

New support platform for Seravo customers

7.3.2019

Providing fast and knowledgeable customer support is one of the cornerstones of Seravo’s success. We have built a service for […]

WordPress 5.1 ”Betty” is released

7.3.2019

With the WordPress 5.0 release in mind that we wrote about earlier as comparison, this is a much smaller and […]