Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Proxy configuration guidance guides/http-proxy.md, guides/troubleshooting.md, references/config.md |
Added package-based and manual proxy setup guidance. The guide covers authentication, bypass hosts, environment variables, diagnostics, disabling, and limitations. Troubleshooting and configuration references link to the guide. |
Guide navigation and manifest wiring bin/handbook-manifest.json, guides.md, index.md |
Registered the HTTP Proxy Configuration guide and added links to it from handbook navigation pages. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Suggested reviewers: swissspidy, ekamran
Merge Risk: 
Low · up to 6806b
-
Users may expect package installation and updates to use the proxy; narrow the guide’s coverage claims to avoid failed or confusing setup behind a proxy.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
Issue
#601requests documentation for HTTP proxy configuration, including manual setup throughwp-cli.ymlandextra-php.guides/http-proxy.mdprovides both methods. It also explains that the manual method configures WordPress core requests and does not configure WP-CLI requests. The guide documents a package for full WP-CLI and core support. The manifest and guide indexes publish the new guide.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#601. The new guide, manifest entry, index links, configuration cross-link, and troubleshooting cross-link support discovery and use of the HTTP proxy configuration. No unrelated product code or behavior changes are present.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@guides/http-proxy.md`:
- Around line 160-165: Update the configuration instructions near the
require-based setup to also document the extra-php fallback, including a short
wp config create --extra-php example or its scope and timing limitations.
- Around line 49-61: Add a prominent warning near the http-proxy YAML example
that proxy credentials, especially the password, must not be committed to
project configuration or source control. Recommend using an untracked
configuration file with restrictive permissions or injecting credentials through
a secret-management mechanism.
- Around line 63-77: Update the “Using Environment Variables” section to state
that env: true selects the first non-empty variable from HTTPS_PROXY,
https_proxy, HTTP_PROXY, and http_proxy, then applies one global proxy rather
than per-scheme proxies or bypass rules. Explicitly document that NO_PROXY and
no_proxy are unsupported, distinguish this behavior from libcurl, and explain
that callers needing bypasses should map NO_PROXY entries to bypass-hosts.
- Around line 147-152: Update the proxy credential handling around
WP_PROXY_USERNAME and WP_PROXY_PASSWORD to URL-decode the parsed username and
password values before defining the constants, while preserving the existing
empty-value checks and constant definitions.
- Around line 135-145: Update the proxy configuration flow after parse_url to
require a valid proxy port, deriving one when appropriate if the URL omits it,
before defining WP_PROXY_HOST. Ensure WP_PROXY_PORT is always defined alongside
WP_PROXY_HOST so WordPress proxy support is enabled only with a valid host and
port.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a6f322d6-32ab-41ec-be2f-8a63dcc95484
📒 Files selected for processing (6)
bin/handbook-manifest.jsonguides.mdguides/http-proxy.mdguides/troubleshooting.mdindex.mdreferences/config.md
|
See also #654 |
Thanks @swissspidy for pointing to #654. Happy to combine efforts , please let me know |
Clarify credential handling, env var behavior, port requirements, URL-decoded auth values, and the extra-php fallback option.
|
@dilipom13 Thanks for your patience, and sorry for the slow reply. Let's go with this PR as the base — I've closed #654, so no need to port your changes anywhere. If anything from that branch is worth keeping, feel free to pull it in here; otherwise this can proceed as is. Generated by Claude Code |
ekamran
left a comment
There was a problem hiding this comment.
Thanks for writing this up. I maintain the package, so I checked the guide against its current release, v0.1.0. Three small fixes inline so the guide matches what the package does.
|
|
||
| ## Using the HTTP Proxy Package (Recommended) | ||
|
|
||
| The [`ekamran/wp-cli-http-proxy-command`](https://github.com/ekamran/wp-cli-http-proxy-command) community package provides complete proxy support for both WP-CLI's internal HTTP requests (e.g. package management, updates) and WordPress core HTTP requests. |
There was a problem hiding this comment.
wp package commands go through Composer, so the package does not cover them. The Limitations section below says the same. Suggest naming what it does cover:
| The [`ekamran/wp-cli-http-proxy-command`](https://github.com/ekamran/wp-cli-http-proxy-command) community package provides complete proxy support for both WP-CLI's internal HTTP requests (e.g. package management, updates) and WordPress core HTTP requests. | |
| The [`ekamran/wp-cli-http-proxy-command`](https://github.com/ekamran/wp-cli-http-proxy-command) community package configures the proxy for both WordPress core HTTP requests and WP-CLI's own HTTP requests made through `WP_CLI\Utils\http_request()`, such as `wp core verify-checksums`. |
| Install the package using the `wp package install` command: | ||
|
|
||
| ```bash | ||
| wp package install ekamran/wp-cli-http-proxy-command |
There was a problem hiding this comment.
On WP-CLI 2.12.0 the bare name installs dev-main. :@stable installs the latest release (v0.1.0), as the package README recommends.
| wp package install ekamran/wp-cli-http-proxy-command | |
| wp package install ekamran/wp-cli-http-proxy-command:@stable |
|
|
||
| This `extra-php` approach only applies to the generated `wp-config.php` at install time. It does not configure WP-CLI's own HTTP requests and is not suitable for existing installs unless you add the constants manually. | ||
|
|
||
| > Note: This manual approach sets the constants used by WordPress core HTTP requests after WordPress loads, but does not automatically route WP-CLI's pre-bootstrap or standalone HTTP requests (such as `wp package` commands). For complete proxy coverage across all WP-CLI operations, use the [`ekamran/wp-cli-http-proxy-command`](https://github.com/ekamran/wp-cli-http-proxy-command) package. |
There was a problem hiding this comment.
The package does not cover wp package commands either, so "complete proxy coverage across all WP-CLI operations" overstates it.
| > Note: This manual approach sets the constants used by WordPress core HTTP requests after WordPress loads, but does not automatically route WP-CLI's pre-bootstrap or standalone HTTP requests (such as `wp package` commands). For complete proxy coverage across all WP-CLI operations, use the [`ekamran/wp-cli-http-proxy-command`](https://github.com/ekamran/wp-cli-http-proxy-command) package. | |
| > Note: This manual approach only defines the constants that WordPress core uses for its own HTTP requests. WP-CLI's own HTTP requests do not use them. To route those through the proxy as well, use the [`ekamran/wp-cli-http-proxy-command`](https://github.com/ekamran/wp-cli-http-proxy-command) package. Neither approach covers `wp package` commands (see Limitations above). |
Fixes #601
Adds HTTP proxy configuration documentation for WP-CLI and WordPress core requests.
guides/http-proxy.mdekamran/wp-cli-http-proxy-commandpackageSummary by CodeRabbit
HTTP_PROXYorHTTPS_PROXYenvironment variables.