Fixed Knowledge Base

Get all the help you need here.

Media Uploads Failing

Posted 04th October, 2018

Media (usually images) that are posted onto a Wordpress site, has to be uploaded to the web server. When these uploads fail, it is usually because Wordpress does not have permission to access your media directory. The four most common causes are:

  • An incorrect upload path.
  • Incorrect folder permissions.
  • An insufficient PHP memory limit.
  • An error caused by a plugin

Upload Path Settings

The upload path may be broken due to a website migration, because the folder has incorrect, or it may have never been set correctly.

The upload folder can be updated by adding the absolute path in the Settings > Media > Upload Files option in the Wordpress admin area.

Alternatively, if the standard WordPress structure is being used, the contents of the upload_path field in the wp-options database table can be cleared. Wordpress will use that original folder by default.

Folder Permissions

Incorrect permissions should result in permission denied errors being logged to error logs. They can be fixed by updating permissions to 644 for files and 755 for directories.

Insufficient php memory limit

PHP is a server side coding language which processes scripts on the web server. These may take time, or server memory, to run. Timeouts should also logged to the error logs.

Memory limits can be fixed by increasing the memory limit settings.

Plugin issue

Debug mode can be enabled in the Wordpress configuration file. This will highlight any plugins causing issues. Those plugins can then be disabled in the Wordpress admin dashboard.