WP-CLI v2.0 Has Arrived: Supercharge Your WordPress Development

If you’ve been to WordCamp once or twice, or maybe you are actively following the WordPress community, chances are you already are aware of the existence of something called “WP CLI.” Perhaps that’s everything you know. Perhaps you’ve used it. Perhaps you would like to consider using it. Let’s dive in what is WP-CLI and the reasons you possibly want it.

Why do I Need WP-CLI?

If there is something developers absolutely love, it’s to find new ways for speeding up and automating all of the tedious, manual snort work that simply could be made much easier. That’s where the WordPress Command Line (WP-CLI) tool comes in – to storm through the tasks with only a couple of keystrokes without messing up the overall flow.

WP-CLI is something developers and site managers have been desiring for a long time. Now it’s a fact. It has a big success in helping overall developer productivity to manage common (and uncommon) tasks of WordPress installations that would otherwise need a much longer period of time to be manually executed via the GUI.

WordPress developers are able to create test sites in a flash, add more test content, remove users, categories, posts, insert test data, search and replace in the database, help with troubleshoot performance issues, and do all kinds of export/import magic. All site managers can now handle plugin and version updates plus other tasks for various sites with a single command.

Some of the core WP-CLI functions can be implemented for:

  • Starting a fresh WordPress website
  • Updating/installing of new themes and plugins for your WordPress site
  • Listing of all plugins and their status
  • Adding, activating, deactivating, and deleting of multiple plugins
  • Updating of the core WP framework
  • Uploading of a good amount of media files together in order to avoid having to do that one by one
  • Creating database backups and restoring already existing ones.
  • Managing WP-Cron related events
  • Creating/changing of user account details and permissions
  • Easy searches and functionality replacements within the database

To check what basic functionality WP-CLI is equipped with, feel free to check the list of all basic commands.

A bit of Primer

WP-CLI, as an open-source project, has been such for more than ten years, initially developed by Cristi Burcă (better known as Scribu) and Andreas Creten, back in 2011. It is being maintained generally by Daniel Bachhuber since 2013. What WP-CLI aims mainly is to help with the speed up of the workflows for WordPress developers, maximize time, and boost developer productivity. Throughout the years the project has developed into so much more. It has steadily gained great momentum in the wide developer community that WordPress has. Since the start of 2017, WP-CLI has been officially repositioned on the WordPress.org site. Also, Alain Schlesser is currently co-maintaining it. WP-CLI version 1.2.0 is the one that was the 2nd release since the project gone under the official umbrella of WordPress and its first major release following the events of hiring Schlesser as a co-maintainer.

The latest WP-CLI release v2.0.0 that was initially due for a release on the end of July but was later rescheduled for August 8th. The delay occurred because it was significantly more work to detach the feature tests and to split them up for reorganizing. A couple of weeks later there was a scheduled bugfix release because the new i18n make-pot command wasn’t new i18n make-pot command was not adequately bundled in v2.0.0. Today we welcome the new WP-CLI v2.0.1!

We’ve just scratched the surface of what you can do with the WP-CLI. Now, let’s check what the breaking changes with the newest update are.

“Framework” & “Bundle” Are Split into Separate Packages

The main difference between WP-CLI 1.5 and WP-CLI v2.0.0, is the structure of the whole tool. With the latest release, the team behind WP-CLI has separated the bundle and the framework into separate packages, meaning that the framework used by most WordPress users and developers is now leaner and faster than ever before. That is a substantial improvement for development and maintenance.

The main difference between versions 1.5 and 2.0.0 of WP-CLI, is in the structure of the tool itself. With its latest release, the team that works on WP-CLI has gone on separating the bundle and the framework into separate packages, which means that the framework being used by the majority of WordPress users and developers is currently leaner and quicker than ever before. That is a substantial improvement for development and maintenance.

Using WP-CLI through Composer

With the detachment of the framework come additional advantages, basically the diminished number of irritating dependencies, for example, the hard requirement on an old Symfony version.

You will not see WP-CLI automatically pull in every one of the bundled up commands. With v2.0.0, it would only pull in the lean framework as a dependency – nothing more, nothing less.

Minimum Version of PHP Update

The minimum PHP version requirement on WP-CLI 2.0.0 already has been bumped up to PHP 5.4. This means it will break for those who try running WP-CLI on PHP 5.3.

FastComet, WP-CLI 2.0.1 Release, and You

If you’re a FastComet customer, you will be happy to know WP-CLI is already installed, and good to go. We’ve already updated WP-CLI to version 2.0.1 on every single one of our servers. Also, FastComet provides SSH with the addition of the full spectrum of WP-CLI in order to help you with the managing of your WordPress installation from the command line. You simply will have to make sure that your account has an activated SSH, and get it ready for use with your local computer.

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.