Skip to content

fix: preserve WordPress cache headers for PHP responses - #24

Open
SourovCodes wants to merge 1 commit into
flywp:mainfrom
SourovCodes:agent/preserve-wordpress-cache-headers
Open

fix: preserve WordPress cache headers for PHP responses#24
SourovCodes wants to merge 1 commit into
flywp:mainfrom
SourovCodes:agent/preserve-wordpress-cache-headers

Conversation

@SourovCodes

Copy link
Copy Markdown

Summary

  • disable Nginx-generated one-hour browser cache headers for regular PHP responses
  • disable the same unconditional browser cache policy in the FastCGI configuration
  • preserve cache headers produced by WordPress

Why

expires 1h; modifies Expires and Cache-Control for every qualifying PHP response. This can make login, admin, REST, query-string, and FastCGI-bypassed responses browser-cacheable for one hour.

Using expires off; keeps browser cache policy under WordPress control. It does not disable FastCGI server-side caching.

Fixes #23

Validation

  • git diff --check
  • verified both PHP location configurations use the documented valid expires off; directive

@SourovCodes
SourovCodes marked this pull request as ready for review August 7, 2026 11:47
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.

expires 1h in PHP locations can override WordPress no-cache headers

1 participant