{"id":1456,"date":"2026-07-17T12:25:26","date_gmt":"2026-07-17T12:25:26","guid":{"rendered":"https:\/\/www.jolt.co.uk\/help\/?p=1456"},"modified":"2026-07-17T13:22:45","modified_gmt":"2026-07-17T13:22:45","slug":"wordpress-media-library-upload-errors","status":"publish","type":"post","link":"https:\/\/www.jolt.co.uk\/help\/wordpress-media-library-upload-errors\/","title":{"rendered":"WordPress Media Library Upload Errors"},"content":{"rendered":"\n<p>This guide helps you identify and fix common upload errors in the WordPress Media Library caused by PHP configuration limits.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Common Error Messages<\/h2>\n\n\n\n<p>When uploading files (especially large images or videos) to WordPress, you may see one of these errors:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>&#8220;Unexpected response from the server&#8221;<\/strong> \u2013 usually means the server ran out of time or memory while processing your upload.<\/li>\n\n\n\n<li><strong>&#8220;The uploaded file exceeds the upload_max_filesize directive in php.ini&#8221;<\/strong> \u2013 your file is larger than the server allows.<\/li>\n\n\n\n<li><strong>&#8220;The uploaded file exceeds the MAX_FILE_SIZE directive&#8221;<\/strong> \u2013 same issue, triggered by the HTML form limit.<\/li>\n\n\n\n<li><strong>Upload bar freezes or the page times out<\/strong> \u2013 the server&#8217;s execution time ran out before the upload completed.<\/li>\n\n\n\n<li><strong>File appears to upload successfully but doesn&#8217;t appear in Media Library<\/strong> \u2013 a less obvious failure, often related to memory limits.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Why This Happens<\/h2>\n\n\n\n<p>Every web server has PHP settings that control how uploads are handled. When a file exceeds any of these limits, the upload fails. The four settings most commonly responsible are:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Setting<\/strong>&nbsp;&nbsp;<\/td><td><strong>What It Controls<\/strong>&nbsp;&nbsp;<\/td><td><strong>Typical Default<\/strong>&nbsp;&nbsp;<\/td><\/tr><tr><td><code>upload_max_filesize<\/code>&nbsp;&nbsp;<\/td><td>Maximum size of a single uploaded file&nbsp;&nbsp;<\/td><td>2M \u2013 64M&nbsp;&nbsp;<\/td><\/tr><tr><td><code>post_max_size<\/code>&nbsp;&nbsp;<\/td><td>Maximum size of all data sent in one request (must be larger than upload_max_filesize)&nbsp;&nbsp;<\/td><td>8M \u2013 128M&nbsp;&nbsp;<\/td><\/tr><tr><td><code>max_execution_time<\/code>&nbsp;&nbsp;<\/td><td>How many seconds the server will wait before stopping the script&nbsp;&nbsp;<\/td><td>30 \u2013 300&nbsp;&nbsp;<\/td><\/tr><tr><td><code>memory_limit<\/code>&nbsp;&nbsp;<\/td><td>How much RAM PHP can use to process the request&nbsp;&nbsp;<\/td><td>128M \u2013 256M&nbsp;&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Important:<\/strong><code>post_max_size<\/code> must always be equal to or greater than <code>upload_max_filesize<\/code>. If it&#8217;s smaller, uploads will silently fail.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">How to Check Your Current Settings<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Option 1: WordPress Site Health<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your WordPress admin dashboard.<\/li>\n\n\n\n<li>Go to <strong>Tools \u2192 Site Health \u2192 Info<\/strong>.<\/li>\n\n\n\n<li>Expand the <strong>Server<\/strong> section.<\/li>\n\n\n\n<li>Look for <code>upload_max_filesize<\/code>, <code>post_max_size<\/code>, <code>max_execution_time<\/code>, and <code>memory_limit<\/code>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Option 2: cPanel<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to cPanel.<\/li>\n\n\n\n<li>Search for MultiPHP INI Editor OR PHP Selector &gt;&gt; Options<\/li>\n\n\n\n<li>Review and adjust the values as needed.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Option 3: Plesk<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to Plesk.<\/li>\n\n\n\n<li>Go to <strong>Domains \u2192 [your domain] \u2192 PHP Settings<\/strong>.<\/li>\n\n\n\n<li>The relevant limits are listed under &#8220;Performance Settings&#8221; or in the custom directives area.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Common Causes and Solutions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">File size too large<\/h3>\n\n\n\n<p><strong>Symptom:<\/strong> Error appears immediately after clicking Upload.<\/p>\n\n\n\n<p><strong>Fix:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Compress the file before uploading. For images, use tools like TinyPNG or ShortPixel. For videos, use HandBrake or a similar compressor.<\/li>\n\n\n\n<li>If the file genuinely needs to be that size, increase <code>upload_max_filesize<\/code> and <code>post_max_size<\/code> (see below).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">PHP timeout<\/h3>\n\n\n\n<p><strong>Symptom:<\/strong> Upload bar progresses slowly then the page times out or shows a server error.<\/p>\n\n\n\n<p><strong>Fix:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Increase <code>max_execution_time<\/code> to 300 (5 minutes) or higher for large files.<\/li>\n\n\n\n<li>Upload during off-peak hours when server load is lower.<\/li>\n\n\n\n<li>Use a chunked upload plugin (see Best Practices below).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Memory limit exhausted<\/h3>\n\n\n\n<p><strong>Symptom:<\/strong> Error appears during upload processing, or file doesn&#8217;t appear after upload.<\/p>\n\n\n\n<p><strong>Fix:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Increase <code>memory_limit<\/code> to at least 256M.<\/li>\n\n\n\n<li>If uploading very large images, WordPress may run out of memory generating thumbnails.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">How to Increase Limits for Testing<\/h2>\n\n\n\n<p>If you have access to cPanel or Plesk, you can increase limits to confirm the issue:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Via cPanel (MultiPHP INI Editor)<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open MultiPHP INI Editor OR PHP Selector &gt;&gt; Options \u2192 <\/li>\n\n\n\n<li>Set:\n<ul class=\"wp-block-list\">\n<li><code>upload_max_filesize<\/code> = 128M<\/li>\n\n\n\n<li><code>post_max_size<\/code> = 128M<\/li>\n\n\n\n<li><code>max_execution_time<\/code> = 300<\/li>\n\n\n\n<li><code>memory_limit<\/code> = 256M<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Save and retry the upload.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Via Plesk (PHP Settings)<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>PHP Settings<\/strong> for your domain.<\/li>\n\n\n\n<li>Adjust the same four values.<\/li>\n\n\n\n<li>Click <strong>OK\/Apply<\/strong> and retry.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Via .htaccess (Apache only)<\/h3>\n\n\n\n<p>Add these lines to the <code>.htaccess<\/code> file in your WordPress root:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php_value upload_max_filesize 128M\nphp_value post_max_size 128M\nphp_value max_execution_time 300\nphp_value memory_limit 256M\n<\/pre>\n\n\n\n<p><strong>Note:<\/strong> This only works on Apache servers with <code>mod_php<\/code>. If you&#8217;re on LiteSpeed, Nginx, or PHP-FPM, use the control panel method instead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Via wp-config.php (memory_limit only)<\/h3>\n\n\n\n<p>Add this line before &#8220;That&#8217;s all, stop editing!&#8221;:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">define('WP_MEMORY_LIMIT', '256M');\n<\/pre>\n\n\n\n<p>This only affects WordPress&#8217;s memory limit, not the other PHP settings.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">When to Request Limit Increases<\/h2>\n\n\n\n<p>Contact support to request changes when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You&#8217;ve confirmed the error and upload will work with higher limits.<\/li>\n\n\n\n<li>You don&#8217;t have access to change PHP settings yourself.<\/li>\n<\/ul>\n\n\n\n<p>When contacting support, include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your domain name<\/li>\n\n\n\n<li>The file size you need to upload<\/li>\n\n\n\n<li>The current limits (from Site Health)<\/li>\n\n\n\n<li>What you&#8217;ve already tried<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Large File Uploads<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Compress files before uploading.<\/strong> Resize images to the maximum display size (usually 1920px wide). Compress videos to H.264\/MP4.<\/li>\n\n\n\n<li><strong>Use a chunked upload plugin.<\/strong> Plugins like &#8220;Big File Uploads&#8221; or &#8220;WP Add Mime Types&#8221; split large files into smaller pieces, avoiding timeout issues.<\/li>\n\n\n\n<li><strong>Consider external hosting for video.<\/strong> YouTube, Vimeo, or Bunny.net are better suited for video delivery than WordPress Media Library.<\/li>\n\n\n\n<li><strong>Upload via FTP\/SFTP for very large files.<\/strong> Upload directly to <code>\/wp-content\/uploads\/<\/code> then use a plugin like &#8220;Add From Server&#8221; or &#8220;Media from FTP&#8221; to register them in WordPress.<\/li>\n\n\n\n<li><strong>Keep WordPress and plugins updated.<\/strong> Some upload bugs are fixed in newer versions.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">When to Escalate<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The file uploaded successfully (confirmed in <code>\/wp-content\/uploads\/<\/code>) but WordPress still shows an error.<\/li>\n\n\n\n<li>Increasing all PHP limits doesn&#8217;t resolve the issue.<\/li>\n\n\n\n<li>The error only happens with specific file types.<\/li>\n\n\n\n<li>Server error logs show 500 errors or mod_security blocks during upload.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Reference Checklist<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u2705 Check the error message to identify the likely cause.<\/li>\n\n\n\n<li>\u2705 Verify current PHP settings via Site Health or control panel.<\/li>\n\n\n\n<li>\u2705 Compare file size against <code>upload_max_filesize<\/code> and <code>post_max_size<\/code>.<\/li>\n\n\n\n<li>\u2705 Try compressing the file first.<\/li>\n\n\n\n<li>\u2705 Increase limits to confirm the fix.<\/li>\n\n\n\n<li>\u2705 Escalate if the issue persists after all settings are correct.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This guide helps you identify and fix common upload errors in the WordPress Media Library caused by PHP configuration limits. Common Error Messages When uploading files (especially large images or videos) to WordPress, you may see one of these errors: &#8220;Unexpected response from the server&#8221; \u2013 usually means the server&hellip;<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,18],"tags":[],"class_list":["post-1456","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-plesk","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/posts\/1456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/comments?post=1456"}],"version-history":[{"count":2,"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/posts\/1456\/revisions"}],"predecessor-version":[{"id":1458,"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/posts\/1456\/revisions\/1458"}],"wp:attachment":[{"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/media?parent=1456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/categories?post=1456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jolt.co.uk\/help\/wp-json\/wp\/v2\/tags?post=1456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}