Published
Updated

WP-CLI is a great tool which we use heavily at Seravo and if you are a developer we hope you do too. Version 2.3 is a smaller release but with some nifty improvements and we actually also participated with a contribution to make comparisons between cross-platform wp i18n makepot creations much better.

New command ‘media fix-orientation’

Maybe you have noticed that images that look OK on your camera or smartphone don’t have the correct orientation when uploaded to WordPress. This is because the orientation is set as EXIF data which is not being respected when uploaded to WordPress. Of course, this is something that would be nice to have solved in the WordPress core and there is in fact a 9-year-old Trac ticket that is being worked on. Until this is solved there is now a new command media fix-orientation that reads these special tags and properly applies them to your images.

Wildcard support to `–skip-tables` parameter

The command search-replace is probably a command you use quite often, and it now has a new additional feature. The flag --skip-tables can now use wildcards to skip a group of tables which can be useful for example when you want to skip tables of a plugin that begin with a prefix. 

Better comparisons with ‘wp i18n makepot

We develop and maintain our own sites at Seravo. An issue was created on July 12th in one of our private GitHub repositories with the title “Investigate why .pot file generation makes ugly diffs”. It had been noticed that commits of updated pot and po files – file formats that are very familiar to anyone that has done some WordPress localization – resulted in very ugly diffs, even after very small changes. This made it difficult to overview changes to these files and therefore very difficult for anyone to review any of these changes.

An example of a “ugly” diff, even if it was not many actual changes the diff was too large to be shown by default by GitHub.

After some investigation it became clear that the reason for this is that the command wp i18n makepot relies on the order the files are returned by the filesystem, and different filesystem implementations on the different operating systems of developers return the files in an arbitrary order.

My colleague Leo set up an issue about this in the WP-CLI repository and later also provided a pull request including the relatively small change to solve the issue with an accompanied test that verified the implementation. Within a couple of weeks, it went from an issue in our internal GitHub repo to a merged pull request and a part of the v2.3 release – a great example of how open source should work.

Continue reading

To catch up on all changes go read the full WP-CLI 2.3 release post and as always the WP CLI documentation is a great resource to learn more about all available commands.

Available for all Seravo customers

We have already started rolling out this to all our customers and the new version is, of course, the default on all new installs. If you are curious about other developer tools that are available, please read more from our WordPress Developer Documentation.

Leave a comment

Read more

In category: Development

PHP 8.2 Soon Available

PHP 8.2 becomes available at Seravo for developer testing. However, we recommend using PHP8 on your live WordPress site – for now!

February 3, 2023

Upcoming PHP Updates at Seravo

Since 2022 PHP 8.0 has been the default PHP version at Seravo, and is automatically enabled on all new sites. PHP 8.1 is also available, and PHP 8.2 will be soon available for developers!

January 25, 2023

PHP 8.0 Enabled by Default

PHP 8.0 is the default version at Seravo’s premium WordPress hosting and upkeep. PHP 8.1 also available!

January 8, 2022

When the Internet Breaks – Make Sure Your Website Works

On Monday, October 4th 2021, something quite exceptional happened that did not go unnoticed by Seravo’s customers. Facebook and other […]

October 9, 2021

Webinar: Search Function and How to Customize It

Seravo’s first webinar of 2021 on January 14th: How to use and customize the WordPress search function?

December 30, 2020

What’s new in PHP 8?

On November 26th 2020, there will be a new version of PHP released. This new release has a number of new features, as well as implementing some non-backward compatible changes. Seravo has already started testing and deploying the release candidates of PHP 8.0 to our servers.

November 19, 2020