Wayback Machine
«MAR MAY JUN »
Previous capture 30 Next capture
2019 2020 2021
0 captures
1 Nov 19 - 31 Jan 21
Close Minimize Help
Skip to toolbar

WordPress.org

Welcome to WP-CLI!

WP-CLI is the official command line tool for interacting with and managing your WordPress sites.

Need help with something? Please review your available support options.

Want to help make it better? Check out our Contributing guide for an introduction, or “good first issues” for your first pull request.

Contact

The WP-CLI team communicates on Slack, in the #cli channel.

Our office hours are held weekly on Tuesdays at 16:00 UTC.

Next meeting: Tuesday, June 2, 2020 at 04:00 PM UTC

WP-CLI

Keyboard Shortcuts | Hide comment threads

WP-CLI Release v2.4.0

Just in time for the release of WordPress Core 5.3.0 we have a new release of WP-CLI as well. A team of 37 contributors has collaborated to get 159 pull requests merged.

Let’s go over some of the noteworthy changes in this release. Most of the work went into compatibility fixes, so there’s not many new toys to play around with, unfortunately. As always, you can also skip directly to the detailed changelog if you prefer.

WordPress 5.3 support

It should be obvious that WP-CLI supports the latest upcoming WordPress Core release, of course. However, there were quite a few changes that went into 5.3 that made it not only difficult to keep WP-CLI working across 5.3 and earlier versions at the same time, but also made it necessary to release WP-CLI in parallel to have a working option available.

The push to support more of the newer PHP features that became available due to the bump to the minimum PHP version of Core introduced changes to function signatures and class interfaces, which required a few adventurous fixes in some cases…

PHP 7.4 support

PHP 7.4 is not yet available in a stable release, but we’re slowly coming closer to the planned release date.

There have been quite a few fixes that went into WP-CLI to make sure it works correctly with PHP 7.4 once it’s available. It’s an ongoing process, still, as we’re working towards the first stable version. Tests are running for PHP 7.4 in the background as well for each package. These are still allowed to fail right now, but after this release, they will be switch to break on error.

Download a specific URL as Core

The core download command now accepts a URL to download a specific ZIP archive with a version of Core to use. This also allows you to use your own custom version easily. Just add the URL and you’re good to go: wp core download http://wayback.fauppsala.se:80/wayback/20200530200828/https://somesite/build.zip

Large image support

WP-CLI will properly deal with large images in the way that WP Core 5.3 was improved. It knows about the original source images as well so you can safely rebuild your thumbnails without losing quality.

Detailed Change Log

wp-cli/wp-cli-bundle

  • Allow patches from dependencies to be applied [#150]

wp-cli/handbook

  • Fix STDERR redirection example code [#342]
  • Add SiteDistrict to hosting-companies.md file [#341]
  • Update reference URLs. [#337]
  • Add WooCart to hosting-companies.md file [#336]
  • Add MinHost to hosting-companies.md file [#334]

wp-cli/wp-cli.github.com

  • Update romanian translation [#392]
  • Update link to wp-completion.bash [#391]
  • [pt_BR] Update to v2.3.0 + refresh sponsors [#390]
  • Update Turkish translation [#389]
  • Small adjustments for French translation [#388]
  • Update ja/index.md [#387]

wp-cli/core-command

  • Use version known to work for core download test [#136]
  • Support URL for core download [#135]
  • install changed to installation [#132]
  • On multisite-convert, don’t assume site_id is 1 [#122]

wp-cli/db-command

  • Fix tests for changes in WP Core 5.3 [#149]
  • Make db clean get all the tables with prefix [#152]
  • Fix output message for STDIN input [#151]

wp-cli/entity-command

  • Fix minor PHPCS violation [#273]
  • Improve comment spam output [#272]
  • Reset user password send error when no user is found [#271]

wp-cli/extension-command

  • Add second must-use plugin that is added with wp-cli-tests 2.1.6+ [#200]
  • Equalize theme folder naming conventions across Win/Mac/Linux [#196]

wp-cli/i18n-command

  • Adapt code to gettext v4.8 [#194]
  • Add --debug output for the file being processed. [#183]
  • Use correct argument name in warning message [#180]

wp-cli/media-command

  • Adapt to changes in WP 5.3 image handling to fix broken tests [#115]
  • Fix suffix of scaled large images [#118]

wp-cli/scaffold-command

  • Required PHP version header [#238]
  • Fix deprecated whitelist code flag [#236]
  • Switch test prep feature from global PHPUnit to local PHPUnit [#235]
  • Add a minimum php requirement [#234]
  • Scripts added to plugin package.json [#225]

wp-cli/widget-command

  • Adapt tests to make the widget expectations more flexible [#34]

Contributors

@aommundsen, @azito122, @beaucollins, @burhandodhy, @connerbw, @derweili, @drzraf, @dz0ny, @felipeelia, @gitlost, @greatislander, @herregroen, @jrfnl, @l3ku, @localheinz, @marksabbath, @marty-crane, @maximejobin, @mcdwayne, @michaelzangl, @mustafauysal, @nxnjz, @nylen, @ocean90, @pdaalder, @raphael-concil, @sagarnasit, @schlessera, @siliconforks, @swissspidy, @tecking, @thrijith, @vladutilie, @wojsmol, @yousan, @zzap

#release, #v2-4-0

Great job Alain! Always happy to make my small contribution to that great tool!

And all of your contributions are highly appreciated, thank you!

Alain, thank you for the good news! I’m happy to make a small contribution to a big project.

WP-CLI v2.4.0 release date

Version 2.4.0 of WP-CLI will be released on Tuesday, November 12th, 2019, presumably around 15:00 UTC.

This places it in-between the release dry-run and the final release for WordPress Core 5.3, which is currently slated for November 12th at around 19:00 UTC.

Note: In case the scheduled release for WP 5.3 is adapted, we might also need to move the one for WP-CLI accordingly. In this case, I’ll send updates as needed.

There quite a few breaking “non-breaking changes” in the upcoming 5.3 release, and some of them have shown a weakness in the current packaging strategy regarding the framework package itself, which are the reason for this release to come on such short notice. Due to its very tight integration with Core, WP-CLI is very susceptible to these breaking changes, and the current packaging strategy does not always deal with this in the best way possible.

After 2.4.0, I will re-evaluate the current versioning policy regarding the framework package and how best to take interface changes in Core into account, that need us to modify signatures between Core versions to support.

We’re all looking forward to an awesome WordPress 5.3 release, so let’s make sure the ecosystem is ready for it! 👍

There quite a few breaking “non-breaking changes” in the upcoming 5.3 release

Will WP-CLI 2.4.0 include changes to wp media regenerate to account for the new changes in WP 5.3 around “big images” and “rotate on upload”, etc?

Did you put quotes around “non-breaking changes” for emphasis like you might use italics or bold? (In American English it’s either a direct quote — which seems odd in the context — or synonymous with air-quotes — which implies sarcasm)

If there are, indeed, no breaking changes, then am I correct in assuming that the upgrade to WP-CLI does not have to be done at the same time as Core? It’s a little tough on web hosts to have to juggle both at once, so space in between would be really welcome.

Sorry, let me clear that up. The quotes were meant to signify the incorrectness of the term via air quotes.

WordPress Core always claims to have few to no breaking changes at all. However, technically, this is not true, it is just interpreted based on “assumed usage”, as there are no explicit interfaces with guarantees in most parts of the code anywhere.

And this is perfectly valid, it is an old code base, and we need to move forward regardless.

For the upcoming release, for example, there are many changes that will break existing code if you just integrate deeply enough with the Core, which WP-CLI does.

A few examples:

To adapt to the new PHP 5.6 minimum, a lot of refactoring was done. This does not break using that code. However, in some instances, the actual signatures were changed, so if you instead extend that code like WP-CLI does (for example with the upgrader skin classes), then PHP fatals because of a signature mismatch.

Another case is the new handling of big images, to automatically rescale them. It was built in such a way that it is not a breaking change for theme developers. However, for any integrations that integrate with it like image resizers, thumbnail regenerators, media libraries, or WP-CLI, the originial image will be hidden by default, so quality will unexpectedly drop considerably.

WP-CLI works around these, and that’s why there’s this 2.4.0 release that is so tightly coupled to the WP Core 5.3 release.

WP-CLI itself, as far as I know right now, should not have any breaking changes in this release.

Hope this clears it up.

And yet another reply as I notice I didn’t actually answer your question…

If there are, indeed, no breaking changes, then am I correct in assuming that the upgrade to WP-CLI does not have to be done at the same time as Core?

This really depends on what you expect to do with it. WP-CLI in general will work fine, however there will be a few cases where you might hit issues with WP 5.3 and WP-CLI < 2.4.0:

  • image regeneration could produce lower quality results
  • if twentytwenty is active and you then downgrade WP Core below 4.7, it will fatal after the version change
  • install and update operations will throw strict notices and might error if these are not allowed

I can only guess right now, but I assume most people will not immediately hit these issues.

Also, in case that helps, I’m currently working on getting a nightly out there that fixes all of these issues. I think it was already built successfully, but I haven’t yet tested it.

I’m sorry about the timing here, but there is a lot happening with this release that made it difficult to get everything fixed earlier, and the fixes are needed for some people as soon as 5.3 is out.

WP-CLI Release v2.3.0

This release v2.3.0 is, as already announced, rather unspectacular. The previous release was very taxing for several reasons, so we lowered the pace for a while to recover.

This version is mainly meant to finally get a few bug fixes out there that were not critical enough to warrant an immediate hotfix release but are nice to have eradicated at one point, nevertheless.

Overall, a team of 36 contributors has collaborated to get 129 pull requests merged. I’ll briefly go over some of the more noteworthy stuff, but as always, you can also skip directly to the detailed changelog if you prefer.

New command to fix image orientation

Some cameras and smartphones will automatically tag pictures to denote “which way is up”. This means that you will have these devices show you the pictures you took during your handstand in the correct orientation no matter what, even though the actual picture file is upside down.

The media command now has a new subcommand media fix-orientation that reads these special tags and properly applies them to your images. This way, the images will also be shown with the correct orientation on devices that do not support this tag.

You can now skip tables using wildcards

The --skip-tables flag for the search-replace command has learnt a new trick – it now lets you skip a group of tables in one go through wildcards.

You can use wildcards like 'wp_*options' or 'wp_post*' to make your life easier.

Add config settings to the end of the file

Up until now you always had to provide an anchor to attach changes to your wp-config.php to when using the config add command.

You can use this through the special anchor flag --anchor=EOF.

Optimized vagrant support

When you’re connecting to your vagrant VMs through WP-CLI’s special-case vagrant SSH connection scheme, you’ll notice that the operations are way faster now, as we’re caching the configuration across calls now.

Detailed Change Log

wp-cli/wp-cli-bundle

  • Permit use of php7.2-mysql and php7.3-mysql in Debian build [#130]

wp-cli/wp-cli

  • Make extraction more robust [#5261]
  • Improve “Adding deferred command…” debug output (Closes: #4893) [#5242]
  • Fix parse_url scheme bug [#5241]
  • Speed up vagrant scheme calls by caching vagrant ssh-config [#5235]
  • Remove bug-provoking test for a bug in WPDB that was fixed [#5220]
  • Fix return types [#5212]

wp-cli/handbook

  • Update handbook for release v2.3.0 [#333]
  • Add Fedora and CentOS to installation instructions [#328]
  • Add documentation to integrate Dash/Alfred [#327]

wp-cli/wp-cli.github.com

  • Add Romanian language [#329]
  • Update Brazilian Portugues translation [#328]
  • Update Japanese translation [#326]
  • Update French translation [#324]

wp-cli/export-command

  • Allow to opt-out from dumping specific sections [#61]
  • Reuse File_Writer for STDOUT support [#60]
  • Make load_export_api() public [#59]

wp-cli/extension-command

  • Add theme status in wp theme get command [#177]
  • Fix issue with failing test cases due to version mismatch [#181]
  • Fix activation issue of installed plugin/theme [#180]

wp-cli/i18n-command

  • Skip broken test on PHP 7.3 [#178]
  • Investigate include/exclude oddities [#175]
  • Sort translation files by name to ensure same order on all systems [#173]
  • Workaround for parsing dynamic imports [#164]
  • Avoid throwing a notice about strpos(): Empty needle when going through include paths [#149]

wp-cli/media-command

  • Skip test for duplicate resizes for core trunk because of bug in current version [#112]
  • Clarify implications of using --skip-copy [#110]
  • Add media fix-orientation command [#108]

wp-cli/search-replace-command

  • Adds wildcards support to --skip-tables parameter [#124]

wp-cli/server-command

  • Fix port number in example [#58]

wp-cli/wp-config-transformer

  • Add EOF as special-case anchor [#23]

Contributors

@afragen, @ajoah, @blackfile, @connerbw, @drzraf, @felipeelia, @fernandoherlo, @fuegas, @fullsteamlabs, @gitlost, @greatislander, @herregroen, @hofmannsven, @jrfnl, @l3ku, @localheinz, @maximejobin, @michaelzangl, @MikeWKrystal, @mustafauysal, @ocean90, @ovidiul, @pdaalder, @sagarnasit, @schlessera, @shadyvb, @shashank3105, @siliconforks, @swissspidy, @szepeviktor, @tecking, @thrijith, @vladutilie, @wojsmol, @yognsk, @yousan

#release, #v2-3-0

Great job @schlessera ! You welcomed me to the project by your guidance and I’m really happy about the contribution. I wish I could do more. Keep up the great work. WP-CLI is so nice to use!

“Thank You” to the team for the consistent updates of this brilliant tool for managing websites!

s
search
c
compose new post
r
reply
e
edit
t
go to top
j
go to the next post or comment
k
go to the previous post or comment
o
toggle comment visibility
esc
cancel edit post or comment
0
:)