{"id":1056,"date":"2026-05-27T12:15:05","date_gmt":"2026-05-27T12:15:05","guid":{"rendered":"https:\/\/www.freethought.uk\/help\/?p=1056"},"modified":"2026-05-27T12:15:05","modified_gmt":"2026-05-27T12:15:05","slug":"media-library-upload-errors-in-wordpress-php-settings-troubleshooting","status":"publish","type":"post","link":"https:\/\/www.freethought.uk\/help\/media-library-upload-errors-in-wordpress-php-settings-troubleshooting\/","title":{"rendered":"Media Library Upload Errors in WordPress \u2013 PHP Settings Troubleshooting"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>When uploading files to the WordPress Media Library, you may encounter errors such as:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>&#8220;Unexpected response from the server&#8221;<br>&#8220;HTTP error&#8221;<br>&#8220;The uploaded file exceeds the upload_max_filesize directive&#8221;<br>Upload progress bar stalling or timing out<\/p>\n<\/blockquote>\n\n\n\n<p>These errors are most commonly caused by PHP configuration limits on the server. This guide will help you identify the cause and understand how to resolve it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Causes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">File Size Too Large<\/h3>\n\n\n\n<p>PHP has a maximum file size limit for uploads. If your file exceeds this limit, the upload will fail. This is the most common cause when uploading videos or large images.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Memory Limit Too Low<\/h3>\n\n\n\n<p>WordPress requires sufficient PHP memory to process uploaded files. If the memory limit is too low, uploads may fail partway through.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Execution Time Limit<\/h3>\n\n\n\n<p>Large file uploads take longer to process. If PHP&#8217;s maximum execution time is reached before the upload completes, it will time out and fail.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Server-Side Upload Limits<\/h3>\n\n\n\n<p>In addition to PHP limits, the web server (Apache or nginx) may have its own upload size restrictions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Check Your Current PHP Settings<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Via phpinfo<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a file called <code>phpinfo.php<\/code> in your WordPress root directory containing: <code>&lt;?php phpinfo(); ?&gt;<\/code><\/li>\n\n\n\n<li>Visit <code>yourdomain.com\/phpinfo.php<\/code> in your browser<\/li>\n\n\n\n<li>Search for the following values:\n<ul class=\"wp-block-list\">\n<li><code>upload_max_filesize<\/code><\/li>\n\n\n\n<li><code>post_max_size<\/code><\/li>\n\n\n\n<li><code>max_execution_time<\/code><\/li>\n\n\n\n<li><code>memory_limit<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Delete the file once you have noted the values \u2014 do not leave it publicly accessible<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Recommended PHP Settings for Media Uploads<\/h2>\n\n\n\n<p>For most WordPress sites the following values are recommended:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Setting<\/th><th>Recommended Value<\/th><\/tr><\/thead><tbody><tr><td>upload_max_filesize<\/td><td>128M or higher<\/td><\/tr><tr><td>post_max_size<\/td><td>256M or higher (must exceed upload_max_filesize)<\/td><\/tr><tr><td>memory_limit<\/td><td>256M or higher<\/td><\/tr><tr><td>max_execution_time<\/td><td>300<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to Request a Limit Increase<\/h2>\n\n\n\n<p>If your current limits are too low and you are unable to adjust them yourself via cPanel, please raise a support ticket including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your hosting account username<\/li>\n\n\n\n<li>The domain affected<\/li>\n\n\n\n<li>The file size you are trying to upload<\/li>\n\n\n\n<li>The exact error message you are seeing<\/li>\n\n\n\n<li>The current PHP limit values from phpinfo (if available)<\/li>\n<\/ul>\n\n\n\n<p>Our team will review and adjust the limits as appropriate for your hosting plan.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Large File Uploads<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Compress files before uploading<\/strong> \u2014 use a tool to reduce video or image file sizes before uploading to WordPress<\/li>\n\n\n\n<li><strong>Use a chunked upload plugin<\/strong> \u2014 plugins such as WP Media Folder or similar can split large files into smaller chunks, bypassing server upload limits<\/li>\n\n\n\n<li><strong>Upload via FTP<\/strong> \u2014 for very large files, uploading directly to the <code>wp-content\/uploads<\/code> directory via FTP and then importing into the Media Library can bypass PHP upload limits entirely<\/li>\n\n\n\n<li><strong>Use external media hosting<\/strong> \u2014 for video files, consider hosting on YouTube or Vimeo and embedding in WordPress rather than uploading directly<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">When to Escalate to Support<\/h2>\n\n\n\n<p>Please contact support if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The file appears to have uploaded successfully but shows an error \u2014 the file may be partially uploaded and require cleanup<\/li>\n\n\n\n<li>Limits have been increased but the error persists<\/li>\n\n\n\n<li>You are seeing errors on small files that should be well within current limits<\/li>\n\n\n\n<li>The issue started suddenly without any changes being made<\/li>\n<\/ul>\n\n\n\n<p>In these cases the issue may be related to plugin conflicts, server resources, or another underlying cause that requires further investigation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview When uploading files to the WordPress Media Library, you may encounter errors such as: &#8220;Unexpected response from the server&#8221;&#8221;HTTP error&#8221;&#8221;The uploaded file exceeds the upload_max_filesize directive&#8221;Upload progress bar stalling or timing out These errors are most commonly caused by PHP configuration limits on the server. This guide will help&hellip;<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,26],"tags":[],"class_list":["post-1056","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/comments?post=1056"}],"version-history":[{"count":2,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1056\/revisions"}],"predecessor-version":[{"id":1069,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1056\/revisions\/1069"}],"wp:attachment":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/media?parent=1056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/categories?post=1056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/tags?post=1056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}