Harness the Power of WP-CLI v1.2.0

WP-CLI 1.2.0 is now available, several months after 1.1.0 was released. After 325 merged pull requests, WP-CLI v1.2.0 comes to theaters chock full of enhancements, bug fixes… and a bootstrap refactor. This is the second release since the project was brought under the official WordPress umbrella and the first major release since hiring Alain Schlesser as a part-time co-maintainer. Let’s see what’s new:

Commands abstracted to distinct packages

WP-CLI 1.2.0 was released with a major overhaul that removes bundled commands from the core in favor of maintaining them in distinct packages. The main wp-cli/wp-cli repository now only contains the framework itself. All of the bundled commands can be found in separate repositories. For instance, the wp cache * series of commands are now located at github.com/wp-cli/cache-command.

Splitting WP-CLI’s internal commands into separate packages moves the project closer to the goal of having official maintainers for the commands in the future. This new structure for the framework and its commands provides several benefits, as outlined by co-maintainer Daniel Bachhuber in the release post:

  • While developing, the tests are only run for the specific component you’re working on, making the feedback loop much shorter.
  • Individual command packages can be controlled and set up independently, opening up the opportunity for better collaboration.
  • Hotfixes and intermediary releases can be published for individual commands, that can then be updated through the built-in package manager.
  • Tests run really fast now.
  • When you submit a pull request, you don’t have to wait two hours for the tests to run.
  • The investments in package abstraction and the bootstrap process are a part of our larger effort to improve the contribution workflow.

New commands

WP-CLI 1.2.0 release also includes three new commands, along with dozens of command improvements and framework enhancements.

  • wp config get lists constants and globals defined in wp-config.php
$ wp config get --fields=key,value  +--------------------+-----------------+  | key | value |  +--------------------+-----------------+  | table_prefix | wp_ |
  • wp config path gets the path to wp-config.php
# Edit wp-config.php in your editor.  $ vim $(wp config path)
  • wp db size gets the size of the database and its tables
$ wp db size --tables  +-----------------------+--------+  | Name | Size |  +-----------------------+--------+  | wp_users | 64 KB |  | wp_usermeta | 48 KB |  | wp_posts | 4 MB |  | wp_comments | 2 MB |  | wp_links | 32 KB |  | wp_options | 1 MB |  | wp_postmeta | 8 MB |  | wp_terms | 416 KB |  | wp_term_taxonomy | 336 KB |  | wp_term_relationships | 736 KB |  | wp_termmeta | 48 KB |  | wp_commentmeta | 2 MB |  +-----------------------+--------+

WP-CLI Has a New Logo

The new logo is designed by Chris Wallace and his team at Lift UX. Undoubtedly, having an official logo opens up the possibility for WP-CLI swag that we all crave for.

FastComet, WP-CLI 1.2.0 release, and you

We have already updated WP-CLI to version 1.2.0 on all our servers. If you haven’t already tried WP-CLI we urge you to give it a go. And if you’d like to try the fastest WordPress hosting and have access to great tools like WP-CLI, try our managed WordPress cloud hosting.

Elena

Elena oversees all Marketing, Product Management and Community efforts for FastComet and is in charge of telling the brand's story. Always pitching, she’ll share the FastComet vision with anyone who’ll listen. Elena helps our customers make the most of their web sites' and focuses on our inbound marketing efforts; everything from developing new online growth strategies, content creation, technical SEO, and outreach within the FastComet community. Her background includes Sales and Customer Relationship development, as well as Online Marketing.