How to Fix “Upload:Failed to Write File to Disk” Error in WordPress

Using WordPress is usually a smooth experience but sometimes small nagging problems can waste your precious time. Some users on the WordPress forum have reported a problem that occurs when they are trying to upload images or other media to their site. The error states “Failed to write file to disk” and for some, an “HTTP error.” Now, these errors don’t give much idea to the user as to why they are appearing and what’s the solution to this problem. So let’s learn how to fix this problem.

fix wordpress problems

Tips to fix “Upload:Failed to write file to disk” Error

This error can occur because of several reasons, and hopefully by the end of this article, you would be able to fix this error. Read on.

Solution #1: Check your ‘Upload’ folder permission

Login to your cPanel, or your web hosting account and click on File Manager. Navigate to public_html/wp-content. There, you will find ‘Uploads’ directory. Right-click on it and then click on “Change Permissions” or simply select this folder and then click on “Permissions” from the toolbar at the top. Normally, this ‘Uploads’ folder should have 755 permission, and if this is not the case, then change it to 755 right now. This is because WordPress needs access to write files in your wp-content/uploads directory to enable certain functions, and if this permission is not set correctly, then you will not be able upload media to your WordPress site. So go ahead, check your ‘Uploads’ folder permission by using cPanel or FTP client like Filezilla or any other.

wordpress uploads folder

Solution #2: Are you exceeding your storage quota?

This might seem very strange but users do get this error because they are exceeding their storage quota. Users on webhosts with shared hosting plans do get affordable packages, but with very low storage space, such as 500MB, 1GB, 2GB and such. If you are the one who is hosting multiple WordPress sites and upload lots of pictures then chances are that even 1GB storage will soon become full. If the storage quota is exceeding, then your web host won’t allow you to upload any other files, and thus this error.

cpanel-disk-space

To know how much storage space you are using, and how much is allocated to you as per your web hosting plan, you can login to cPanel and check the left sidebar. Notice the “Disk space usage” field, which will inform you how much disk space you are using, and your total space as per your hosting plan. If you are exceeding or very near to filling out your disk space, then it’s time to upgrade to a better plan, or delete files in your account that you do not require. However, in most cases, it is better to upgrade to a plan with more disk storage space so that you don’t run out full again.

Solution #3: Clear temporary folder of the server

Sometimes this issue occurs if the temporary directory where PHP stores the newly uploaded file is full. Normally users don’t have access to this temporary directory and that’s why you will need to contact your web host and ask them to clear the temporary files in the server directory. Contacting support of your host will help you here.

Conclusion

Have these solutions helped you in solving “Failed to write file to disk” error? If all of these solutions failed, it is time to contact your web host by creating a support ticket or live chat. Explain them that you are getting this error and from when. This can also be a server issue sometimes and that’s why they will be able to help you or at least point in the right direction.

Do check out our WordPress problems and fixes section to fix all your everyday WordPress related problems.

Leave a Comment

Your email address will not be published. Required fields are marked *