New co-maintainer, Alain — thanks 2017 sponsors

WP-CLI welcomes its second maintainer, thanks to the support of our 2017 sponsors.

New co-maintainer: Alain Schlesser

First, I’d like to formally welcome Alain Schlesser as WP-CLI’s newest co-maintainer. If you’ve been following the project over the last month, you may have noticed him diving deep into WP-CLI’s internals. We’re excited about the infrastructural improvements coming in the next release, and the new features they’ll enable.

Alain is new to the WordPress community, and brings years of experience developing for other platforms, from hobby game development to large enterprise projects in a government environment.

I’m wildly excited about the opportunity to join Daniel and work on WP-CLI. This project represents a special facet of the WordPress ecosystem and comes with a unique set of requirements and challenges. I can’t wait to explore the possibilities!
— Alain

With Alain joining the project as a co-maintainer, the WP-CLI project is restoring capacity to meet current demands (e.g. support), and ramping up on new feature development and evangelization. We’ve already improved the build time by 33%!

Come say hello to Alain at our new office hours every Tuesday. Office hours start tomorrow, Tuesday, April 4 at 16:00 UTC

Thanks 2017 sponsors

Maintaining an open source project requires a substantial, ongoing commitment of time and energy. WP-CLI is a dependable tool loved by thousands because it’s actively maintained, which is made possible by the generosity of its sponsors.

Premier Sponsors

Individual Sponsors

Aaron Jorbin, Anant Shrivastava, Andy Fragen, Austin Ginder, Barry van Someren, Ben Meredith, Ben Welch-Bolen, Bill Christensen, Birgit Pauli-Haack, Bjørn Johansen, Boone Gorges, Carl Hancock, Chuck Reynolds, Craig Martin, Daniel Hüsken, David Herrera, David McDonald, Doruk Fisek, Drew Linsalata, Dwayne McDaniel, Erik Joling, Full Name, Hidetaka Okamoto, Hugh McGuire, Ian Johnson, Jared Atchison, Jason Conroy, Javi, Javier Arnáez, Jeremiah J Terhark, Joel Gaeddert, John Speed, Jonathan Bossenger, Jonathan Daggerhart, Joost de Valk, Joshua Koenig, Kevin Cristiano, Knight Tan, Matt Gross, Matthew Lawrence, Mike Garrett, Miya0001, Ned Zimmerman, Nicholas Duncan, Nick Cernis, Patrick Garman, Per Søderlind, Pippin Williamson, Rachel Baker, Rahul Bansal, Ralf Hortt, required gmbh, Richard Aber, Rick Wiggins, Robert Mathews, Rocket Lift In., Ross Wintle, Ryan Sullivan, Sean Hayes, Simon Blackbourn, Steph Gray, Tadpole Collective, Tanner, Thiana Kitrilakis, Thorsten Ott, Vlad Olaru, WP Bullet, Yash Chandra

Two new commands: doctor and profile

Excited to experiment with a couple new WP-CLI commands? wp doctor and wp profile are now available for everyone to install.

wp doctor lets you diagnose problems within WordPress by running a series of checks for symptoms. It includes an API for defining your own diagnosis, as well as writing custom checks.

$ wp @daniel doctor check --all
Running checks  100% [============================================================================================] 0:02 / 0:09
| name                       | status  | message                                                            |
| core-verify-checksums      | success | WordPress verifies against its checksums.                          |
| file-eval                  | success | All 'php' files passed check for 'eval\(.*base64_decode\(.*'.      |
| autoload-options-size      | success | Autoloaded options size (16.25kb) is less than threshold (900kb).  |
| constant-savequeries-falsy | success | Constant 'SAVEQUERIES' is undefined.                               |
| constant-wp-debug-falsy    | success | Constant 'WP_DEBUG' is defined falsy.                              |
| core-update                | success | WordPress is at the latest version.                                |
| cron-count                 | success | Total number of cron jobs is within normal operating expectations. |
| cron-duplicates            | success | All cron job counts are within normal operating expectations.      |
| option-blog-public         | success | Site is public as expected.                                        |
| plugin-active-count        | success | Number of active plugins (2) is less than threshold (80).          |
| plugin-deactivated         | success | Less than 40 percent of plugins are deactivated.                   |
| plugin-update              | success | Plugins are up to date.                                            |
| theme-update               | warning | 1 theme has an update available.                                   |

wp profile quickly identifies what’s slow with WordPress, by giving you visibility into key I/O indicators.

$ wp @daniel profile stage --fields=stage,time,cache_ratio
| stage      | time    | cache_ratio |
| bootstrap  | 0.2643s | 80%         |
| main_query | 0.0186s | 85.71%      |
| template   | 0.0489s | 93.71%      |
| total (3)  | 0.3318s | 86.47%      |

Both packages are in early stages of development — feedback welcome!

Let’s do this!

As announced last week, WP-CLI is now an official project. I consider this the best possible outcome of my efforts trying to identify sustainability for the project over the last year. Frankly, it’s hard to communicate how relieved I am.

But wait, what does that actually mean?

Most of the details are still to be worked out. On a high-level, these are the big changes:

  • The website will be migrated to some part of, shape and form TBD.
  • Development will continue on Github, and could possibly move to (see below).
  • At the end of the day, I am no longer solely responsible for the project. If I were to be hit by a bus, there’s a more recognizable continuation plan for someone else to step in. Eventually, I hope to onboard a couple more maintainers who regularly invest significant time in the project.

The decision to make WP-CLI an official WordPress project also means there’s a clear path forward for me to invest more of my own time into the WP-CLI roadmap. Concurrent with the transition process over the next couple of months, I want to move forward the conversation of how we realize a future where WP-CLI is the fastest way to do anything with WordPress. If that’s something you’re interested in, stay tuned!

Migrating the website

In order to successfully and completely migrate the website to (and WordPress), it’s important to understand its current form:

  • is a Jekyll-based website hosted on Github / Github Pages.
  • Much of the reference documentation is generated by a series of WP-CLI commands from the WP-CLI codebase. These commands take structured data about the codebase and transform it into a series of Markdown files served by Jekyll. This documentation is typically regenerated for every major release.
  • The rest of the documentation is a series of user-editable files. It would be nice to be able to replicate the pull request workflow for editing the docs, because it’s a good source of contributions.
  • The WP-CLI package index ( is built from a separate Github repository. It uses Satis to build the HTML and JSON representations of the package index. Satis is running on one of my personal servers.

These are the core functions needing to be replicated on Ideally, the work done would be the foundation of where I’d love to see the WP-CLI website go in the future:

  • Produce command pages for the packages listed in the package index.
  • Proxy Github API requests for new WP-CLI versions (from 3426).
  • Display download / installation counts for each package.
  • Display number of Github stars for each package.
  • Highlight packages in the index that are regularly updated, have multiple maintainers, or reflect some other quality we hold to be important.
  • Create distribution releases for packages in the package index to speed up installation (from 2566).
  • Run test suite for each package on a weekly basis (from 3197).
  • Validate packages submitted to the package index (from 3177).

Migrating the Github repo

Fortunately, Github makes it easy to transfer repositories between organizations. Before we make the switch, we need to dot the i’s and cross the t’s on these core functions:

  • Travis is used to run the test suite. Travis also commits a build artifact to the builds repo.
  • WP-CLI’s update check uses the Github releases API. If Github doesn’t transform the request URI for migrated repos, then users will experience a cryptic error. Now that I write this, this dependency might be a large-ish problem.
  • Similarly, some users have build systems dependent on a consistent URL pattern for the release Phar file. See the releases page for examples.

It’s also worth noting there will be more WP-CLI repositories in the future. Each new feature will be developed as an independent package. In fact, existing features (e.g. search-replace) are going to be split out into separate packages too. We’ll need an organizational structure that can accommodate this growth (let it be or

Anything I’ve missed? Have a question about something I didn’t cover? Hit me up with a comment!

cc @pento

Version 1.1.0 released

Happy release day!

Today, I’m excited to bring you WP-CLI v1.1.0, chock full of enhancements and bug fixes.

Want to get props in the next release? There are a few projects we’ll be working on:

And, in case you missed it: I’m looking for help maintaining WP-CLI (paid opportunity, commitment of 5-10 hours/week). Know someone who might fit? Email or ping ‘danielbachhuber’ on the WordPress Slack.

Everything in 1.1.0

Command improvements:

  • wp cache *:
    • Explicitly sets default cache group as ‘default’ to replicate WordPress’ behavior [#3714]
  • wp cache type:
    • Detects W3 Total Cache object cache [#3637]
  • wp (comment|post|user) list:
    • Magically parses CSV values for any argument with double underscore [#3726, #3744]
  • wp core config:
    • Introduces --force parameter for overwriting existing wp-config.php file [#3706]
  • wp core is-installed:
    • Prevents error notice from wp_guess_url() when core isn’t installed [#3711]
  • wp core language install:
    • Passes $wp_version through to translations_api() so that WordPress reports the correct language download file [#3748]
  • wp core update:
    • Supports --version=(nightly|trunk), which will download the latest nightly build [#3645]
  • wp core update-db:
    • Updates wpmu_upgrade_site option for all networks, not just current, to ensure the admin notice is dismissed [#3659]
  • wp db *:
    • Runs help at the same point as the command, to enable wp help db import to be run when WordPress has been downloaded, a wp-config.php has been created, but WordPress hasn’t yet been installed [#3780]
  • wp db cli:
    • Makes it possible to pass arguments through to the mysql executable [#3745]
  • wp db export:
    • Appends a random hash to generated SQL file to help mitigate database files from being accessible at predictable URLs [#3765]
  • wp media regenerate:
    • Support generating thumbnails for ‘application/pdf’ for WordPress 4.7+ [#3768]
  • wp plugin install:
    • Correctly installs ZIPs uploaded to the GitHub release page for a project [#3776]
    • Displays error message when a plugin cannot be installed due to write permissions [#3764]
  • wp scaffold plugin:
    • Ignores multisite.xml.dist in scaffolded .distignore [#3677]
  • wp scaffold plugin-tests:
    • Opts-in to container-based infrastructure on Travis [#3739]
    • Supports PHP 7.1 and PHPUnit 5.7 when scaffolding .travis.yml [#3758]
    • Updates GitLab template to run WPCS tests [#3772]
  • wp scaffold (plugin-tests|theme-tests):
    • Validates plugin/theme slug to prevent you from scaffolding tests into an unexpected directory [#3666]
  • wp scaffold _s:
    • Validates theme slug earlier to provide a more understandable error [#3724]
  • wp search-replace:
    • Supports passing regex modifiers [#3639]
    • Only skips replacement when array is a reference to an existing array [#3708, #3713]
  • wp server:
    • Sets the path global parameter as docroot [#3700]
  • wp site create:
    • Replicates core logic for creating $newdomain and $path to form proper path then global $base isn’t ‘/’ [#3688]
  • wp site option list:
    • Adds --site_id=<id> filter [#3769]
  • wp theme install:
    • Uses http cacher when automatically installing a parent theme [#3689]
  • wp theme mod get:
    • Introduces --field=<field> argument for fetching a particular field [#3644]

Framework enhancements:

  • Updates Composer-based dependencies to latest [#3638, #3676#3678, #3698, #3720, #3786]
  • Ensures passed positionals take precedent over defaults defined in wp-cli.yml [#3648]
  • WP_CLI::runcommand() correctly persists current process’ environment variables [#3683, #3730]
  • Removes backslashes from display of path when destination folder already exists [#3691]
  • Globalizes wp-config.php variables to local scope too, enabling WordPress to properly change $table_prefix in multisite [#3695]
  • Adds global parameters to bash completion [#3697]
  • Permits dots to be used in aliases [#3705]
  • Introduce a Behat step for replacing a string in a file [#3712]

Contributors to this release (pull requests, documentation, and package authors): amqbgeihsgt, danielbachhuberedpittol, ernilambargreatislanderinderpreet99, louisremilwhmetodiew, migueldemoura, miya0001mmcev106, nikschavan, ntwbnylenocean90ramoonusrosswintleszepeviktortrepmalwestonruter

You can browse the full list of resolved issues on Github.