Skip to content

WordPress fixes, security checks, and performance guides for site owners and builders.

Start with fixes
Fixes

How to Fix the WordPress Media Upload HTTP Error

Fix the WordPress media upload HTTP error by checking the file, PHP limits, image processing, plugins, permissions, and server logs.

5 min read Last updated Jun 15, 2026

The WordPress media upload HTTP error does not identify one specific fault. Start by uploading a small JPG or PNG. If that works, investigate the original file and server limits. If every upload fails, check plugins, permissions, and server logs instead.

Check whether the problem is limited to one file

Open Media > Add New and upload a small image with a simple filename such as upload-test.jpg. WordPress supports common image formats through the standard Media Library uploader.

If the test succeeds, prepare the original image again:

  • Shorten the filename and remove unusual characters.
  • Export the image as a fresh JPG or PNG.
  • Reduce its pixel dimensions, not just its file size.
  • Confirm that its extension matches its actual format.
  • Try uploading it without embedded color profiles or unnecessary metadata.

A compressed image can still require substantial memory when WordPress opens it to create thumbnails. An image with very large dimensions may therefore fail even when its file size is below the displayed upload limit.

If the image came from editing software, exporting a new copy is usually safer than changing only the extension.

Compare the file with the server upload limit

The upload screen may display a maximum file size. If your file exceeds it, resizing the file is the quickest fix.

PHP controls uploads through several settings:

  • upload_max_filesize limits an individual uploaded file.
  • post_max_size limits the complete request and must be larger than upload_max_filesize.
  • memory_limit limits the memory available while WordPress processes the image.
  • max_execution_time can stop slow image processing.

The PHP configuration documentation explains how these limits interact. Increasing only upload_max_filesize may not help if post_max_size, a reverse proxy, or the web server still has a lower limit.

On managed hosting, change these values through the hosting control panel or ask support. On a self-managed server, edit the PHP configuration used by the website, then restart the relevant PHP service if required. Record the old values first so you can restore them if the change causes problems.

Do not set unlimited or excessively high values to work around one upload. Use limits appropriate for the media your site actually needs.

Determine whether image processing is failing

WordPress creates additional image sizes after receiving an upload. The transfer can complete while thumbnail generation fails, leaving the dashboard with a generic HTTP error.

Try these checks:

  1. Upload a small JPG.
  2. Upload the problem image after reducing its dimensions.
  3. Upload a small non-image file type that the site permits.

Allowed file types depend on the site's configuration and the current user's permissions. A rejected document does not necessarily indicate the same problem as a failed image upload.

If permitted documents upload but large images do not, image processing may be failing. Ask your host to check for PHP memory errors and confirm that the GD or Imagick image-processing extension is available and working.

The wp media image-size command lists registered image sizes:

wp media image-size

This can help identify how many image variants WordPress is configured to create, but it does not test uploads or thumbnail generation.

Rule out a plugin conflict

Security, image optimization, media offloading, and firewall plugins can intercept upload requests or process files immediately afterward.

Use a staging site when possible. Otherwise, take a backup and temporarily deactivate the plugins most likely to affect media uploads. Test after each change so you can identify the specific plugin instead of leaving several disabled.

If the upload starts working, reactivate the plugin and review its logs and settings. Update it before changing server configuration. If the failure returns with the plugin enabled, contact its vendor with the filename, upload time, and relevant error message.

A theme conflict is less common for uploads made directly through Media > Add New, but it is worth testing a default WordPress theme if plugins have been ruled out and the site uses custom media code.

Check the uploads directory

WordPress must be able to create files and year/month directories inside wp-content/uploads. Incorrect ownership or permissions can make every upload fail.

Check that:

  • The uploads directory exists.
  • The PHP or web-server user can write to it.
  • Parent directories allow WordPress to reach it.
  • The filesystem has free space and has not exceeded an inode or account quota.

Follow the official WordPress file permissions guidance for your server. Do not set the uploads directory to 777; that grants unnecessary access and can hide the underlying ownership problem.

Before changing permissions or ownership, note the existing values. Restore them if the change does not solve the error.

Use the HTTP status to choose the next step

Open your browser's developer tools, select the Network panel, and repeat the upload. Inspect the failed request:

  • 403 can result from a security rule, authentication check, permissions problem, or web application firewall.
  • 413 usually indicates that a web server or proxy considers the request too large.
  • 500 indicates a server-side failure, which may come from PHP, WordPress, or another application component.
  • 502 or 503 can occur when PHP or another upstream service times out, becomes unavailable, or is overloaded.

These codes narrow the investigation but do not establish the cause on their own. Check the PHP error log, web-server error log, and hosting dashboard around the exact upload time.

Temporarily enabling WordPress debugging may reveal a plugin or PHP error. Disable debug display on production sites, remove temporary debugging changes afterward, and never publish logs containing paths, account details, or request data.

Contact the host when the server rejects the request

Escalate the problem when small uploads also fail, permissions are correct, and disabling relevant plugins makes no difference. Send the host:

  • The exact time of the failed upload, including the time zone.
  • The filename, format, size, and pixel dimensions.
  • The HTTP status from the browser's Network panel.
  • Whether a small JPG succeeds.
  • Whether other permitted file types succeed.
  • Any relevant log entry with sensitive details removed.

Ask the host to check PHP limits, image-processing failures, disk quotas, proxy limits, timeout rules, and firewall events. This gives support enough information to identify the responsible layer without weakening security or making broad configuration changes.

Editorial Staff

The BugWP editorial staff publishes practical WordPress guides for fixes, security, performance, hosting, Cloudflare, and plugin/theme recovery.