
WordPress sets the file permission such Read, Write and Execute that allow or deny you to upload images, videos or files to your website. If your blog is throwing Upload: failed to write file to disk error then you should set the correct file permissions to the directories and files that allow you to upload files in your website.
As a beginner this error can be frustrating but can be fixed easily. In this tutorial you will learn how to fix Upload: Failed to write file to disk error in WordPress blog.

Cause of Upload Failed to Write File to Disk
One of the common causes of this error is the incorrect file permission set in your web server which will deny you to upload files from the WordPress dashboard.
Your default file permissions for files is 644 and file permissions to the folder is 755. Because of some technical issues in your hosting server it may change which will cause issue in uploading files in your website.
If you are getting one of the error messages below then your file permission is not set correctly.
- WordPress Failed to Write to Disk.
- WordPress has Failed to Upload Due to an Error Failed to Write File to Disk.
- Unable to Create Directory wp-content/uploads/2019/01. Is its Parent Directory Writable by the Server?
How to Fix this Error?
Connect to the web server using FTP client FileZilla. Open root directory e.g. public_html where you will find wp-content folder. You need to set correct file permission to wp-content folder.

All files in wp-content should have file permission 644 that allows you to read, write and execute the files.
All folders in wp-content should have file permission 755 that allows you to read, write and execute the folders.
Right click on wp-content folder and click on File permissions.

In numeric value type 644 then check Recurse into subdirectories then select apply to files only and click on ok button. This will apply permissions to all the files inside wp-content.

Now, you have to set the permissions to folders only. Type 755 in numeric value field then check Recurse into subdirectories box then select apply to directories only and click on ok button. It will apply file permissions to all the folders including uploads folder where your images are stored.

Now, try to upload the files to your website, If the error still exists then you need to empty temporary files directory in your website. To do this you need to contact your WordPress hosting provider.
WordPress uses temporary files directory before saving the images in uploads folder. If your temporary files directory quota exceeds then you need to clear the temporary files directory.
We hope this guide on how to fix Upload: Failed to Write File to Disk Error in WordPress is helpful. If you find this guide helpful, please share and follow us on facebook and twitter.