WP-CLI 0.24 Will Deprecate wp-settings-cli.php in Favor of wp-settings.php

For the past three years, WP-CLI has loaded a modified copy of WordPress’ wp-settings.php. The reason behind this, according to Cristi Burcă, the project’s original maintainer, is that “WordPress does several things that don’t make sense in a CLI context.” Keeping that modified copy up-to-date was a small chore, but it offered WP-CLI far more control over how it interacts with WordPress.

After the next release, users will experience fewer incompatibility issues, such as WP-CLI breaking on a host because a new version of WordPress came out. The utility would also often break in development environments where users forgot to update it.

Bachhuber said that this change may also enable the project to fix another issue which sometimes causes WP-CLI to fail when parsing custom wp-config.php. According to Bachhuber, this problem is “probably the most reported WP-CLI bug of all time.” He is working with contributors to improve the documentation on the architecture as major roadblocks like these are removed.

The 0.24 milestone has only eight tickets remaining and 335 closed. Developers can expect many major improvements of long-standing issues in the upcoming release.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.