|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +author: danielbachhuber |
| 4 | +title: Version 0.25.0 released |
| 5 | +--- |
| 6 | + |
| 7 | +Happy release day! |
| 8 | + |
| 9 | +Today, I'm excited to bring you WP-CLI v0.25.0. Check out the [newly published roadmap](/docs/roadmap/) for details on upcoming releases and product focus (hint: there's a future where WP-CLI no longer supports PHP 5.3). |
| 10 | + |
| 11 | +Let's dive in. |
| 12 | + |
| 13 | +### Compatibility with WordPress 4.7 |
| 14 | + |
| 15 | +WordPress 4.7 introduces a new `WP_Hook` implementation for registering and executing actions and filters. Because WP-CLI has its own `WP_CLI::add_wp_hook()` that was erroneously accessing the `$wp_filter` global even when the `add_filter()` function was available, WP-CLI could fatal in certain circumstances. WP-CLI now appropriately calls `add_filter()` when it's available. |
| 16 | + |
| 17 | +**Importantly, due to the nature of these changes, WP-CLI versions prior to 0.25.0 will be incompatible with WordPress 4.7.** |
| 18 | + |
| 19 | +Inspect the change in [this pull request](https://github.com/wp-cli/wp-cli/pull/3384). |
| 20 | + |
| 21 | +### New packages in the Package Index |
| 22 | + |
| 23 | +The WP-CLI community has been quite active in creating new tools for you to use (and contribute back to): |
| 24 | + |
| 25 | +* [aaemnnosttv/wp-cli-login-command](https://github.com/aaemnnosttv/wp-cli-login-command) - Log in to WordPress with secure passwordless magic links. |
| 26 | +* [alessandrotesoro/wp-cli-helpscout-docs-parser](https://github.com/alessandrotesoro/wp-cli-helpscout-docs-parser) - Extract helpscout docs articles and categories to build an offline documentation. |
| 27 | +* [alessandrotesoro/wp-usergen-cli](https://github.com/alessandrotesoro/wp-usergen-cli) - Generate random users for testing purposes. |
| 28 | +* [anhskohbo/wp-cli-themecheck](https://github.com/anhskohbo/wp-cli-themecheck) - Run Themecheck in WP-CLI. |
| 29 | +* [BeAPI/wp-cli-light-db-export](https://github.com/BeAPI/wp-cli-light-db-export) - Allows you to export big databases with all the tables but not all the data. |
| 30 | +* [binarygary/db-checkpoint](https://github.com/binarygary/db-checkpoint) - Treat your DB like a save point in a video game. |
| 31 | +* [brightoak/wp-cli-envoyer](https://github.com/brightoak/wp-cli-envoyer) - Invoke an Envoyer deployment via WP-CLI. |
| 32 | +* [getshifter/wp-cli-shifter](https://github.com/getshifter/wp-cli-shifter) - Enables you to import/export your WordPress site for the Shifter. |
| 33 | +* [eriktorsner/wp-checksum](https://github.com/eriktorsner/wp-checksum) - Verify checksums for themes and plugins. |
| 34 | +* [iandunn/wp-cli-plugin-active-on-sites](https://github.com/iandunn/wp-cli-plugin-active-on-sites) - List all sites in a multisite network that have activated a given plugin. |
| 35 | +* [markri/wp-sec](https://github.com/markri/wp-sec) - Checks for WordPress CVE security issues at wpvulndb.com. |
| 36 | +* [mattgrshaw/wp-installer](https://github.com/mattgrshaw/wp-installer) - Simple commands to install and uninstall WordPress. |
| 37 | +* [pressbooks/pb-cli](https://github.com/pressbooks/pb-cli) - A suite of wp-cli commands for Pressbooks. |
| 38 | +* [runcommand/assign-featured-images](https://github.com/runcommand/assign-featured-images) - Assign featured images to posts that support thumbnails. |
| 39 | +* [runcommand/manifest](https://github.com/runcommand/manifest) - Produces an overview of WordPress' configuration for a high-level understanding of what's going on inside of WordPress. |
| 40 | +* [rxnlabs/wp-composer](https://github.com/rxnlabs/wp-composer) - Manage your WordPress site dependencies using the power of Composer. |
| 41 | +* [trendwerk/faker](https://github.com/trendwerk/faker) - Fake post data with WP-CLI. |
| 42 | +* [trepmal/blog-extractor](https://github.com/trepmal/blog-extractor) - Extract a single blog from multisite. |
| 43 | +* [trepmal/wp-revisions-cli](https://github.com/trepmal/wp-revisions-cli) - Manage revisions. |
| 44 | +* [welaika/wp-cli-db2utf8](https://github.com/welaika/wp-cli-db2utf8) - Downgrade db encoding of a new WP installation to UTF8. |
| 45 | + |
| 46 | +Install any one of these with `wp package install <package-name>` (where `<package-name>` is typically the `<user>/<repo>`). When you do, go say thanks to the author! |
| 47 | + |
| 48 | +### More ways to install WP-CLI packages |
| 49 | + |
| 50 | +Although we'd love to see your package listed in the Package Index, we realize there are reasons you might not be able to do so. `wp package install` now supports installing an arbitrary Git URL [[#3482](https://github.com/wp-cli/wp-cli/pull/3482)], `.zip` file [[#3485](https://github.com/wp-cli/wp-cli/pull/3485)], or directory path [[#3484](https://github.com/wp-cli/wp-cli/pull/3484)] as a package. |
| 51 | + |
| 52 | + $ wp package install git@github.com:runcommand/doctor.git |
| 53 | + $ wp package install https://github.com/runcommand/doctor.zip |
| 54 | + $ wp package install doctor |
| 55 | + |
| 56 | +(doctor is the [second premium WP-CLI command from runcommand](https://runcommand.io/wp/doctor/)) |
| 57 | + |
| 58 | +It's worth noting Composer's behavior is slightly different for each package type: |
| 59 | + |
| 60 | +* Git URLs are treated as VCS repositories, and cloned to `~/.wp-cli/packages/vendor`. |
| 61 | +* ZIP archives (remote and local) are extracted to `~/.wp-cli/packages/local`, and added as path repositories. |
| 62 | +* Local directory paths are added as path repositories, which means Composer creates a symlink to the existing directory path. If the directory you've provided is removed, then the installation will break. |
| 63 | + |
| 64 | +### Everything else in 0.25.0 |
| 65 | + |
| 66 | +New commands: |
| 67 | + |
| 68 | +* `wp db check` - Runs `mysqlcheck` with the default `--check` option [[#3332](https://github.com/wp-cli/wp-cli/pull/3332)]. |
| 69 | +* `wp site option *` - CRUD commands for managing WordPress site options [[#3386](https://github.com/wp-cli/wp-cli/pull/3386)]. |
| 70 | +* `wp user session *` - CRUD commands for managing user sessions [[#3307](https://github.com/wp-cli/wp-cli/pull/3307)]. |
| 71 | + |
| 72 | +Command improvements: |
| 73 | + |
| 74 | +* `wp cli update`: |
| 75 | + * Introduces `--stable` to install or reinstall the latest stable version [[#3430](https://github.com/wp-cli/wp-cli/pull/3430)]. |
| 76 | +* `wp core config`: |
| 77 | + * Adds comments to generated `wp-config.php` to better match the one provided by WordPress core [[#3312](https://github.com/wp-cli/wp-cli/pull/3312)]. |
| 78 | +* `wp core download`: |
| 79 | + * Preserves case for `--version` argument to properly handle release candidates [[#3283](https://github.com/wp-cli/wp-cli/pull/3283)]. |
| 80 | + * Ensures `wp core download --version=latest` produces correctly-versioned cache key [[#3467](https://github.com/wp-cli/wp-cli/pull/3467)]. |
| 81 | +* `wp core language update`: |
| 82 | + * Fixes strict standard error about variable reference [[#3380](https://github.com/wp-cli/wp-cli/pull/3380)]. |
| 83 | + * Permits updating language packs even when `en_US` is set as locale [[#3397](https://github.com/wp-cli/wp-cli/pull/3397)]. |
| 84 | +* `wp core multisite-(install|convert)`: |
| 85 | + * Warns when multisite constants can't be inserted into `wp-config.php`, instead of erroneously inserting at the end [[#3272](https://github.com/wp-cli/wp-cli/pull/3272)]. |
| 86 | + * Includes adequate vertical spacing around inserted constants [[#3267](https://github.com/wp-cli/wp-cli/pull/3267)]. |
| 87 | +* `wp core update-db`: |
| 88 | + * Ensures `wp core update-db --network --dry-run` is actually dry [[#3347](https://github.com/wp-cli/wp-cli/pull/3347)]. |
| 89 | +* `wp core version`: |
| 90 | + * Displays default core language in `wp core version --extra` [[#3221](https://github.com/wp-cli/wp-cli/pull/3221)]. |
| 91 | +* `wp import`: |
| 92 | + * Indicates current file in WXR import progress indicator to communicate the total count is of the current file, not all files [[#3270](https://github.com/wp-cli/wp-cli/pull/3270)]. |
| 93 | +* `wp media regenerate`: |
| 94 | + * Adds a simple progress indicator [[#3407](https://github.com/wp-cli/wp-cli/pull/3407)]. |
| 95 | +* `wp option list`: |
| 96 | + * Adds `--no-transients` flag to ignore transients [[#3452](https://github.com/wp-cli/wp-cli/pull/3452)]. |
| 97 | + * Adds `--exclude=<exclude>` argument to list options excluding a specific pattern [[#3455](https://github.com/wp-cli/wp-cli/pull/3455)]. |
| 98 | +* `wp package install` |
| 99 | + * Displays package dependency details when installing a package with a dependency [[#3418](https://github.com/wp-cli/wp-cli/pull/3418), [#3425](https://github.com/wp-cli/wp-cli/pull/3425)]. |
| 100 | +* `wp package uninstall` |
| 101 | + * Removes a package's dependencies when the package is removed [[#3343](https://github.com/wp-cli/wp-cli/pull/3343)]. |
| 102 | + * Properly assigns `$composer_backup` when uninstalling [[#3399](https://github.com/wp-cli/wp-cli/pull/3399)]. |
| 103 | +* `wp plugin install`: |
| 104 | + * Removes branch names from directories created for Github-based ZIPs [[#3314](https://github.com/wp-cli/wp-cli/pull/3314), [#3451](https://github.com/wp-cli/wp-cli/pull/3451)]. |
| 105 | +* `wp scaffold plugin-tests`: |
| 106 | + * Uses PHP version specific to Trusty on CircleCI [[#3359](https://github.com/wp-cli/wp-cli/pull/3359)]. |
| 107 | + * Uses correct default user for MySQL on CircleCI [[#3457](https://github.com/wp-cli/wp-cli/pull/3457)]. |
| 108 | + * Uses the latest version of PHPUnit on Travis, depending on PHP version [[#3463](https://github.com/wp-cli/wp-cli/pull/3463)]. |
| 109 | + * Adds WordPress Coding Standards to newly-scaffolded plugins [[#3472](https://github.com/wp-cli/wp-cli/pull/3472)]. |
| 110 | +* `wp search-replace`: |
| 111 | + * Ensures tables are quoted to support all permitted characters [[#3318](https://github.com/wp-cli/wp-cli/pull/3318)]. |
| 112 | + * Prevents error notice when `export_insert_size` isn't defined [[#3357](https://github.com/wp-cli/wp-cli/pull/3357)]. |
| 113 | + * Fails back to PHP if SQL triggers an error for some reason [[#3387](https://github.com/wp-cli/wp-cli/pull/3387)]. |
| 114 | +* `wp server`: |
| 115 | + * Supports passing a custom `.ini` file to configure the server [[#3330](https://github.com/wp-cli/wp-cli/pull/3330)]. |
| 116 | +* `wp site create`: |
| 117 | + * Use `get_blog_details()` for the site URL when creating a new site to ensure the correct URL is displayed [[#3416](https://github.com/wp-cli/wp-cli/pull/3416)]. |
| 118 | +* `wp site empty`: |
| 119 | + * Ensures the entire uploads directory is empty [[#3400](https://github.com/wp-cli/wp-cli/pull/3400)]. |
| 120 | +* `wp theme install`: |
| 121 | + * Correctly installs parent theme when installing a child theme [[#3301](https://github.com/wp-cli/wp-cli/pull/3301)]. |
| 122 | +* `wp transient`: |
| 123 | + * Consolidates `wp transient delete-all` and `wp transient delete-expired` to flags of `wp transient delete` [[#3389](https://github.com/wp-cli/wp-cli/pull/3389)]. |
| 124 | +* `wp user create`: |
| 125 | + * Prevents email notifications when users are created because email notifications should only be sent when `--send-email` is provided [[#3331](https://github.com/wp-cli/wp-cli/pull/3331)]. |
| 126 | + |
| 127 | +Framework enhancements: |
| 128 | + |
| 129 | +* Updates Composer-based dependencies to latest [[#3257](https://github.com/wp-cli/wp-cli/pull/3257), [#3429](https://github.com/wp-cli/wp-cli/pull/3429), [#3460](https://github.com/wp-cli/wp-cli/pull/3460), [#3468](https://github.com/wp-cli/wp-cli/pull/3468)]. |
| 130 | +* Properly handles registering an instantiated object as a command [[#3269](https://github.com/wp-cli/wp-cli/pull/3269)]. |
| 131 | +* Splits the `ProcessRun` class out to its own file [[#3377](https://github.com/wp-cli/wp-cli/pull/3377), [#3422](https://github.com/wp-cli/wp-cli/pull/3422)]. |
| 132 | +* Permits running test suite with `WP_VERSION` env variable [[#3383](https://github.com/wp-cli/wp-cli/pull/3383), [#3392](https://github.com/wp-cli/wp-cli/pull/3392)]. |
| 133 | +* Prevents error notice when using `Utils\get_named_sem_ver()` with WP versions [[#3404](https://github.com/wp-cli/wp-cli/pull/3404)]. |
| 134 | +* Fixes fatal error for failed early database connection by handling `dead_db()` error on `nocache_headers` filter [[#3440](https://github.com/wp-cli/wp-cli/pull/3440)]. |
| 135 | +* Assigns a default `$_SERVER['SERVER_NAME']` to prevent uncaught exception when `wp_mail()` is used [[#3449](https://github.com/wp-cli/wp-cli/pull/3449)]. |
| 136 | +* Ignores `url:` in `wp-cli.yml` when alias is used, because aliases completely override user, url, path, ssh, and http [[#3450](https://github.com/wp-cli/wp-cli/pull/3450)]. |
| 137 | +* Warns when `WP_CLI::launch()` ends up with `return_code=-1`, which could be caused by a custom compiled version of PHP that uses the `--enable-sigchild` option [[#3458](https://github.com/wp-cli/wp-cli/pull/3458)]. |
| 138 | +* Provides more verbosity in `wp_die()` handler to give the end user more detail when a database connection fails [[#3459](https://github.com/wp-cli/wp-cli/pull/3459)]. |
| 139 | +* Supports passing arguments to `WP_CLI::do_hook()` [[#3470](https://github.com/wp-cli/wp-cli/pull/3470)]. |
| 140 | +* Logs the current alias when executing an alias group [[#3471](https://github.com/wp-cli/wp-cli/pull/3471)]. |
| 141 | +* Only checks `options` for a positional argument when a value is present [[#3481](https://github.com/wp-cli/wp-cli/pull/3481)]. |
| 142 | +* Variety of bash completion improvements [[#3490](https://github.com/wp-cli/wp-cli/pull/3490), [#3491](https://github.com/wp-cli/wp-cli/pull/3491), [#3492](https://github.com/wp-cli/wp-cli/pull/3492)]. |
| 143 | + |
| 144 | +Bug fixes across the board: |
| 145 | + |
| 146 | +* Defines all requisite dependencies for PHP 7 on Debian-based systems [[#3208](https://github.com/wp-cli/wp-cli/pull/3208)]. |
| 147 | +* Ensures `site --site_id= -> site --network_id=` backwards compat shim only affects `wp site create` [[#3227](https://github.com/wp-cli/wp-cli/pull/3227)]. |
| 148 | +* Catches exceptions thrown by `RecursiveDirectoryIterator` when verifying core checksums [[#3266](https://github.com/wp-cli/wp-cli/pull/3266)]. |
| 149 | +* Passes slashed data in meta commands [[#3274](https://github.com/wp-cli/wp-cli/pull/3274)]. |
| 150 | +* Ensures appropriate WP-CLI package index URL is used in the `composer.json` [[#3276](https://github.com/wp-cli/wp-cli/pull/3276)]. |
| 151 | +* Corrects reference of `WP_CLI` to use global namespace in `WP_CLI\Utils\get_temp_dir()` [[#3369](https://github.com/wp-cli/wp-cli/pull/3369)]. |
| 152 | + |
| 153 | +Contributors to this release (pull requests, documentation, and package authors): [2ndkauboy](https://github.com/2ndkauboy), [aaemnnosttv](https://github.com/aaemnnosttv), [alessandrotesoro](https://github.com/alessandrotesoro), [anhskohbo](https://github.com/anhskohbo), [balbuf](https://github.com/balbuf), [BeAPI](https://github.com/BeAPI), [binarygary](https://github.com/binarygary), [bradp](https://github.com/bradp), [brightoak](https://github.com/brightoak), [danielbachhuber](https://github.com/danielbachhuber), [danilomaccioni](https://github.com/danilomaccioni), [diggy](https://github.com/diggy), [getshifter](https://github.com/getshifter), [eriktorsner](https://github.com/eriktorsner), [ernilambar](https://github.com/ernilambar), [fisele](https://github.com/fisele), [grappler](https://github.com/grappler), [guillaumemolter](https://github.com/guillaumemolter), [iandunn](https://github.com/iandunn), [johnbillion](https://github.com/johnbillion), [jorgeatorres](https://github.com/jorgeatorres), [kouratoras](https://github.com/kouratoras), [markri](https://github.com/markri), [mattgrshaw](https://github.com/mattgrshaw), [miya0001](https://github.com/miya0001), [mustafauysal](https://github.com/mustafauysal), [nyordanov](https://github.com/nyordanov), [ocean90](https://github.com/ocean90), [petenelson](https://github.com/petenelson), [polevaultweb](https://github.com/polevaultweb), [pressbooks](https://github.com/pressbooks), [rahulsprajapati](https://github.com/rahulsprajapati), [runcommand](https://github.com/runcommand), [rxnlabs](https://github.com/rxnlabs), [shulard](https://github.com/shulard), [swissspidy](https://github.com/swissspidy), [szepeviktor](https://github.com/szepeviktor), [taianunes](https://github.com/taianunes), [tnorthcutt](https://github.com/tnorthcutt), [trendwerk](https://github.com/trendwerk), [trepmal](https://github.com/trepmal), [veganista](https://github.com/veganista), [welaika](https://github.com/welaika) |
| 154 | + |
| 155 | +You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.25.0+is%3Aclosed) on Github. |
0 commit comments