Happy release day!
We’re excited to bring you WP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ v1.4.0. In just two short months, we’ve merged 308 pull requests from 42 contributors.
You may have noticed a few new faces around the project. This is our motley crew of committers:
- Martin (@gitlost) lives in Dublin, Ireland. Check out his work with
wp db search and
wp search-replace --log (see below).
- Siddharth (@Sidsector9) resides in Pune, India. His enhancements to
wp doctor and
wp profile will be available soon in a release near you.
- Takayuki (@miya0001) is based out of Kyoto, Japan. He’s been making numerous improvements across the entire project; you never know what his next pull request will fix.
They’ve already had an amazing impact on the project. Please pass along your thanks when you have the chance.
Log search-replace transformations
If you’ve ever wanted to see what transformations are taking place with
wp search-replace, now you can!
wp search-replace --log to display transformations as they happen, or
wp search-replace --log=transformations.log to save the transformations to a file [#35, #39]:
$ wp search-replace 'http://' 'https://' --log
| Table | Column | Replacements | Type |
| wp_options | option_value | 3 | PHP |
Success: Made 3 replacements.
It’s even more beautiful in color. Check out this asciicinema video for the full glory.
wp search-replace is much slower when logging transformations, so please use it wisely.
See registered image sizes
Does uploading a new image take forever? You might have too many registered image sizes!
Both themes and plugins make use of
add_image_size() [ref] to define names for image sizes they expect to use in templating. For each registered image size with a hard crop, WordPress has to create the cropped version on upload. With dozens of image sizes, uploading an image can take tens of seconds.
wp media image-size to see all of the image sizes registered to WordPress [#36, #37, #39, #49]:
$ wp media image-size --format=count
55 is too many!
Everything else in v1.4.0
New and notable
wp cli has-command: Detect whether a command is registered [#4349].
wp site (mature|unmature|public|unpublic): Manage
public status of a site [#63].
wp * (pluck|patch): Fetch and modify serialized data in options and meta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. [#24, #65].
wp user (spam|unspam): Mark a user as spam or not spam [#74, #86, #90].
- Improves performance of
--skip-content to download WordPress without default themes/plugins (US locale only) [#37, #40, #41].
- Makes use of
halt_on_error to catch error and release lock [#38].
Y-m-d in default export file name [#36].
- Caters for reserved word column/table names [#40].
- Changes default delimiter to
- Fixes match in non-regex case [#45].
- Lessens context duplication by shortening and appending context if it overlaps with the next match [#55].
- Avoids displaying default delimiter on regex fail in db search [#56].
--stdout to write WXR to
--max_file_size=-1 to avoid splitting export files [#12, #21].
--max_num_posts=<num> to limit number of posts in an export file [#15].
- Avoids use of
GLOB_BRACE for compatibility with Alpine Linux [#14].
- Properly handles query strings on image import to prevent security error [#35].
--preserve-filetime argument to support persisting file modification time [#42].
- Skips non-thumbnailed PDFs & other images rather than fail [#48].
- Adds deprecation notice [#36].
- Supports package names that differ from repository names [#31].
- Only includes Composer return code when it’s set [#40].
- Removes repository entry when uninstalling [#37].
- Skips renaming ZIPs coming from a GitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ archive release/tag [#45].
- Wraps all uses of
get_plugins() with the
all_plugins filter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. [#31].
- Includes dropins like
object-cache.php when listing installed plugins [#55].
- Only displays pagination message when
yarn.lock to distignore template [#57].
bin/install-wp-tests.sh to allow temp directory override [#39].
- Uses latest branch for test library in
bin/install-wp-tests.sh, and always gets the latest major release A set of releases or versions having the same major version number may be collectively referred to as “X.Y” -- for example version 5.2.x to refer to versions 5.2, 5.2.1, and all other versions in the 5.2. (five dot two dot) branch of that software. Major Releases often are the introduction of new major features and functionality. when 2 digit WP versions are used [#35].
- Removes XDebug in scaffolded
.travis.yml to improve performance [#49].
- Improves error message when
phpunit is run before
- Shows progress when invoking
- Adds PHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. http://php.net/manual/en/intro-whatis.php. 7.0 and 7.1 to scaffolded GitLab configuration [#68].
- Enhances pluralization by internalizing Doctrine library [#54, #58, #59].
esc_sql_ident() function to escape column/table names [#23].
--regex-delimiter argument and validation for the
--regex-flags argument [#28, #29, #30].
--report flag so report can be suppressed with
--report-changed-only flag option to only report changed fields [#32].
- Avoids displaying default delimiter on regex failure [#40].
- Prevent deleting the root site on multisite Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. WordPress MultiUser project was discontinued and its features were included into WordPress core.https://codex.wordpress.org/Create_A_Network., which WordPress core Core is the set of software required to run WordPress. The Core Development Team builds WordPress. doesn’t permit [#73].
- Permits importing CSV from STDIN [#100].
May also refer to The collection of PHP_CodeSniffer rules (sniffs) used to format and validate PHP code developed for WordPress according to the PHP coding standards. while narrowly avoiding committer mutiny [#4058].
- Improves AutoloadSplitter regexes [#4422].
- Add skips argument to
- Provides dictionary-based suggestions for common misspellings [#4392].
- Introduces new ‘halt_on_error’ to overload exit in
- When extracting, fails back to
tar xz when
PharData throws an Exception [#4371].
- Adds support for running commands over
vagrant ssh [#4348].
- Supports upper- and lowercase ‘Y’ when prompting a flag [#4334].
- Gives suggestions when exiting early on
wp help [#4266, #4303].
Contributors to this release (42 total): aaemnnosttv, AaronRutley, ako80218, anhskohbo, atimmer, BhargavBhandari90, danielbachhuber, desrosj, diggy, domantasg, drzraf, eliseferguson, ethanclevenger91, Flimm, fumikito, GaryJones, gitlost, goldenapples, hearvox, Ippey, javorszky, jdub233, johnbillion, kurudrive, Lewiscowles1986, mimosafa, mitchelldmiller, mitraval192, miya0001, n8finch, nameherocom, nextgenthemes, ryotsun, schlessera, shadyvb, Sidsector9, stevegrunwell, szepeviktor, takezou, Umangvaghela, waviaei, wp-make-coffee