Raise WordPress upload limits: nginx body-size + PHP-FPM per-directory overrides#33
Draft
Copilot wants to merge 1 commit into
Draft
Raise WordPress upload limits: nginx body-size + PHP-FPM per-directory overrides#33Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
Copilot
AI
changed the title
Raise nginx upload body-size limits for WordPress plugins and media
Raise WordPress upload limits: nginx body-size + PHP-FPM per-directory overrides
Jun 13, 2026
Copilot created this pull request from a session on behalf of
MaximillianGroup
June 13, 2026 21:33
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uploading large plugins (e.g. Gutenberg at ~35 MB) returned
413 Request Entity Too Largefrom nginx because/wp-admin/update.phpinherited the global10mdefault. PHP-FPM'supload_max_filesizedefaulted to2M, silently blocking media uploads that nginx would otherwise pass.nginx (
nginx/snippets/spx-upload-limits.conf)Per-route
client_max_body_sizeoverrides, included by the HTTPS vhost:/wp-admin/update.php64m— plugin/theme ZIPs/wp-admin/async-upload.php100m— media library uploader/wp-json/wp/v2/media100m— REST API media endpointAll values stay at or below Cloudflare's 100 MB per-request cap. Global default remains
10m.PHP-FPM (
var/www/html/.user.ini) — new filePHP-FPM scans
.user.inifrom the document root for every request.upload_max_filesize/post_max_sizearePHP_INI_PERDIRand cannot be set viaini_set()at runtime.Direct web access is blocked by the existing
<Files "\.(env|ini|...)$"> Require all deniedrule inapache/conf-available/common-settings.conf.