Skip to content

Document HTTP proxy configuration for WP-CLI and WordPress core - #658

Open
dilipom13 wants to merge 2 commits into
wp-cli:mainfrom
dilipom13:fix/601-http-proxy-docs
Open

Document HTTP proxy configuration for WP-CLI and WordPress core#658
dilipom13 wants to merge 2 commits into
wp-cli:mainfrom
dilipom13:fix/601-http-proxy-docs

Conversation

@dilipom13

@dilipom13 dilipom13 commented Aug 2, 2026

Copy link
Copy Markdown

Fixes #601

Adds HTTP proxy configuration documentation for WP-CLI and WordPress core requests.

  • New guide: guides/http-proxy.md
  • Recommends ekamran/wp-cli-http-proxy-command package
  • Includes manual fallback for WordPress core-only proxy setup
  • Updates manifest, index, guides list, and cross-links in config/troubleshooting docs

Summary by CodeRabbit

  • New Features

    • Added comprehensive HTTP proxy configuration guidance for WP-CLI and WordPress core requests.
    • Documented installation, YAML setup, authentication, bypass hosts, diagnostics, disabling, limitations, and manual core configuration.
  • Documentation

    • Added proxy guidance links throughout the handbook, guides index, troubleshooting content, and configuration references.
    • Clarified that HTTP_PROXY and HTTPS_PROXY environment variables are not automatically honored.

@dilipom13
dilipom13 requested a review from a team as a code owner August 2, 2026 07:38
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 079a0908-27a7-4b96-af0c-005c09b28dfe

📥 Commits

Reviewing files that changed from the base of the PR and between 253b3be and 125b9fe.

📒 Files selected for processing (1)
  • guides/http-proxy.md

📝 Walkthrough

Walkthrough

Added HTTP proxy configuration documentation for WP-CLI and WordPress core requests. The guide covers package installation, YAML settings, authentication, bypass hosts, environment variables, diagnostics, disabling, limitations, and manual proxy constants. Related handbook pages now link to the guide.

Changes

HTTP proxy documentation

Layer / File(s) Summary
Proxy configuration guidance
guides/http-proxy.md, guides/troubleshooting.md, references/config.md
Added package-based and manual proxy configuration guidance, environment-variable behavior, diagnostics, limitations, and related troubleshooting references.
Guide navigation and manifest wiring
bin/handbook-manifest.json, guides.md, index.md
Registered the HTTP Proxy Configuration guide and added links from handbook navigation pages.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: brianhenryie

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: documenting HTTP proxy configuration for WP-CLI and WordPress core.
Linked Issues check ✅ Passed The documentation addresses proxy behavior, environment variables, manual wp-cli.yml and extra-php configuration, and the distinction between core and WP-CLI requests [#601].
Out of Scope Changes check ✅ Passed The manifest, navigation updates, and troubleshooting cross-links directly support the HTTP proxy documentation objective and add no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5e521dc and 253b3be.

📒 Files selected for processing (6)
  • bin/handbook-manifest.json
  • guides.md
  • guides/http-proxy.md
  • guides/troubleshooting.md
  • index.md
  • references/config.md

Comment thread guides/http-proxy.md
Comment thread guides/http-proxy.md
Comment thread guides/http-proxy.md
Comment thread guides/http-proxy.md Outdated
Comment thread guides/http-proxy.md
@swissspidy

Copy link
Copy Markdown
Member

See also #654

@dilipom13

Copy link
Copy Markdown
Author

See also #654

Thanks @swissspidy for pointing to #654. Happy to combine efforts , please let me know
which PR you'd like to use as the base, and I'll align my changes accordingly.

Clarify credential handling, env var behavior, port requirements, URL-decoded auth values, and the extra-php fallback option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add HTTP proxy configuration example

2 participants