Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Avoid the extra PHP process in the wp launcher

Open Beginner friendly
#389 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
bash, php
Domain
cli, testing

Research direction

Start by reading bin/wp in wp-cli/wp-cli to locate the php -r "echo PHP_OS;" call used for Cygwin detection. Devise a shell-based check to avoid the extra PHP process. Done means wp launches with one PHP call and the CI timings recorded here show speed-up versus the #384 baseline.

Written by the indexing model from the issue text.

Description

scope:testing status:unconfirmed

The wp launcher script starts PHP twice for every command: once to run php -r "echo PHP_OS;", which is only needed to detect Cygwin, and once to run WP-CLI itself. Together with the shell wrappers this adds about 30 ms to every call (121 ms versus 92 ms for wp cli version locally).

The test suites make well over 10,000 wp calls per run of the bundled commands, so this adds up to several minutes for each CI configuration. It also slows down every real-world invocation.

The fix belongs in bin/wp in wp-cli/wp-cli. It is tracked here because the test suite is where the impact is largest.

Measuring: take the baseline from #384, then open a draft PR, run the same CI jobs against it and record both results here before we decide.

Dominant language
PHP
Stars
42
Forks
28
Avg merge
15h 17m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wp-cli/wp-cli-tests

All issues in wp-cli/wp-cli-tests

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.