{"id":212,"date":"2026-04-11T18:12:14","date_gmt":"2026-04-11T18:12:14","guid":{"rendered":"https:\/\/qfd.systems\/blog\/wordpress-resolving-413-request-entity-too-large-expanding-to-256mb\/"},"modified":"2026-04-11T18:12:14","modified_gmt":"2026-04-11T18:12:14","slug":"wordpress-resolving-413-request-entity-too-large-expanding-to-256mb","status":"publish","type":"post","link":"https:\/\/qfd.systems\/blog\/en\/wordpress-resolving-413-request-entity-too-large-expanding-to-256mb\/","title":{"rendered":"WordPress: Resolving 413 Request Entity Too Large (Expanding to 256MB)"},"content":{"rendered":"<h1>[Guide] Expanding WordPress Multisite Upload Capacity to 256MB<\/h1>\n<p>This is a comprehensive &#8216;Full-Stack&#8217; configuration guide to resolve upload limits restricted to <code>1MB<\/code> or <code>2MB<\/code> in WordPress (especially Docker-based Multisite) environments. It consists of 5 essential steps, from the server engine to application settings.<\/p>\n<p>&#8212;<\/p>\n<h2>1. PHP Configuration (PHP-FPM Environment)<\/h2>\n<p>This is the cleanest way to override PHP settings in a Docker environment.<\/p>\n<p>&#8211; <strong>Filename:<\/strong> <code>.user.ini<\/code><br \/>&#8211; <strong>Path:<\/strong> <code>\/var\/www\/html\/<\/code> (WordPress root directory)<\/p>\n<pre class=\"wp-block-code\"><code lang=\"ini\" class=\"language-ini\">upload_max_filesize = 256M\npost_max_size = 256M\nmemory_limit = 512M\nmax_execution_time = 600\n<\/code><\/pre>\n<blockquote class=\"wp-block-quote\">\n<p><strong>Security Tip:<\/strong> To prevent external access to your <code>.user.ini<\/code> file via a browser, add the following code to the top of your <code>.htaccess<\/code> file:<\/p>\n<pre class=\"wp-block-code\"><code lang=\"apache\" class=\"language-apache\">&gt; &lt;Files \".user.ini\"&gt;\n&gt;     Require all denied\n&gt; &lt;\/Files&gt;\n&gt; <\/code><\/pre>\n<\/p>\n<\/blockquote>\n<p>&#8212;<\/p>\n<h2>2. Forced WordPress Runtime Allocation (<code>wp-config.php<\/code>)<\/h2>\n<p>When server configurations are ignored, this method forcibly injects PHP settings at the time WordPress initializes.<\/p>\n<p>&#8211; <strong>Filename:<\/strong> <code>wp-config.php<\/code><br \/>&#8211; <strong>Placement:<\/strong> Insert at the very top, immediately below the <code>&lt;?php<\/code> tag.<\/p>\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">@ini_set( 'upload_max_size' , '256M' );\n@ini_set( 'post_max_size', '256M' );\n@ini_set( 'memory_limit', '512M' );\n@ini_set( 'max_execution_time', '300' );\n<\/code><\/pre>\n<p>&#8212;<\/p>\n<h2>3. Web Server Level Configuration (<code>.htaccess<\/code>)<\/h2>\n<p>These settings apply when the Apache server processes requests.<\/p>\n<p>&#8211; <strong>Filename:<\/strong> <code>.htaccess<\/code><br \/>&#8211; <strong>Caution:<\/strong> Write these <strong>outside<\/strong> the <code># BEGIN WordPress<\/code> and <code># END WordPress<\/code> blocks to prevent them from being overwritten during WordPress updates.<\/p>\n<pre class=\"wp-block-code\"><code lang=\"apache\" class=\"language-apache\"># --- PHP Upload Limits Start ---\nphp_value upload_max_filesize 256M\nphp_value post_max_size 256M\nphp_value memory_limit 512M\nphp_value max_execution_time 600\nphp_value max_input_time 600\n# --- PHP Upload Limits End ---\n<\/code><\/pre>\n<p>&#8212;<\/p>\n<h2>4. Multisite Network Settings (The Core Solution)<\/h2>\n<p>In a Multisite environment, the <strong>Network Admin<\/strong> settings take precedence over all server-level configurations.<\/p>\n<p>1.  Navigate to <strong>My Sites &gt; Network Admin &gt; Settings<\/strong>.<br \/>2.  Locate the <strong>Max upload file size<\/strong> field.<br \/>3.  Change the value to <strong><code>262144<\/code><\/strong> (KB unit, equivalent to 256MB) and save.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/qfd.systems\/blog\/wp-content\/uploads\/2026\/04\/Pasted20image2020260411195104.webp\" style=\"max-width:100%; height:auto; display:block; margin: 1em 0;\" \/><\/p>\n<p>&#8212;<\/p>\n<h2>5. Nginx Reverse Proxy Configuration (Mandatory)<\/h2>\n<p>By default, Nginx blocks requests exceeding <code>1MB<\/code>. If you are using Nginx or a Reverse Proxy (e.g., Synology) in front of your server, this step is mandatory.<\/p>\n<p>&#8211; <strong>Configuration:<\/strong> Inside the <code>http<\/code> or <code>server<\/code> block.<\/p>\n<pre class=\"wp-block-code\"><code lang=\"nginx\" class=\"language-nginx\">client_max_body_size 256M;\n<\/code><\/pre>\n<\/p>\n<p>&#8212;<\/p>\n<h2>\u2705 Final Verification<\/h2>\n<p>After completing all settings, restart the container (<code>docker restart<\/code>) and check the &#8220;Maximum upload file size: 256 MB&#8221; message under the <strong>Media &gt; Add New<\/strong> menu.<\/p>\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">docker restart [wordpress_container_name]\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/qfd.systems\/blog\/wp-content\/uploads\/2026\/04\/Pasted20image2020260411195400.webp\" style=\"max-width:100%; height:auto; display:block; margin: 1em 0;\" \/><\/p>\n<p>&#8212;<br \/><strong>Author:<\/strong> MASTER<br \/><strong>Date:<\/strong> 2026-04-10<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Guide] Expanding WordPress Multisite Upload Capacity to 256MB This is a comprehensive &#8216;Full-Stack&#8217; configuration guide to resolve upload limits restricted to 1MB or 2MB in WordPress (especially Docker-based Multisite) environments. &hellip; <\/p>\n","protected":false},"author":1,"featured_media":209,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[341,343,345,347,60,349],"class_list":["post-212","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-en","tag-10g_network-en-en","tag-dba_tuning-en-en","tag-docker-en-en","tag-nginx-en-en","tag-synology-en","tag-wordpress-en-en"],"_links":{"self":[{"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/posts\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/comments?post=212"}],"version-history":[{"count":0,"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/posts\/212\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/media\/209"}],"wp:attachment":[{"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/media?parent=212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/categories?post=212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qfd.systems\/blog\/wp-json\/wp\/v2\/tags?post=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}