HTTP error is a common error, that can be very frustrating for beginner WP users. In this article, I’ll show you how to fix Fix “Failed to write file to disk.” or “HTTP error.” in WordPress. These errors can occur due to a many reasons.
Failed to write file to disk.
1. First Simple trial.
HTTP error or Failed to write file to disk. due to Custom Templates or plugins
To check weather the HTTP error is due to your custom template disable that one and enable any default template. Prior to making any changes, I would suggest you to take the complete backup of the content of the website. Then try uploading image. If you are able to upload image then the problem is due to your custom template. Now, change your template back to your custom template. Most probably your issue may be eliminated.
If the problem is not eliminated after changing to default template, disable all of your plugins and try upload a file. If the error is not occurring the error is due to any of your plugin. Try enable them, one by one and you can find the plugin that causes uploading error. Update/replace/ disable that plugin.
2. Fixes for WP media upload errors due to File or Folder permission errors
HTTP error or Failed to write file to disk. due to File Permissions.
The most common reason for “HTTP errors” are due to incorrect folder permissions. To eliminate this error you need to connect to your WordPress site using a FTP client.
Connect FTP using your FTP client like File Zill / Cute FTP, Navigate to wp-content folder, right click on the uploads folder and select file permissions.
First Change Folder Permissions to 755 by Checking ‘Recurse into subdirectories’ tick Box first and then click on ‘Apply to directories only’ option , Click on the OK button to continue.
Then Change File Permissions to 644by Checking ‘Recurse into subdirectories’ tick Box first and then click on ‘Apply to files only’ option , Click on the OK button to continue.
Change Folder Permissions
Change File Permissions