We are a team of results-driven creative geniuses at PMGS Digital Agency that are enthusiastic about expanding your business and have the skills to do it.
How to fix ‘’Upload: Failed to write file to disk’’ error in WordPress
Are you facing ‘Upload: Failed to write file to disk’ error on your WordPress site when you try to upload any files?
Yes, this can be a frustrating error for WordPress beginners, but continue reading this article and you can see how to fix this issue
What causes the “failed to write files to disk” error in WordPress?
This error is caused by multiple reasons and the most common out of the rest can be incorrect folder permission.
Every folder and file within a website has a few permissions. The web server has control over the access to these files depending on the permission.
You cannot write files to a server with incorrect permissions to a folder. Which means the webserver would not be able to add news files or create files to that specific folder.
You will see the below mentioned error messages if you try to upload any images or any sort of file from the WordPress admin area:
- WordPress failed to write to disk
- WordPress has failed to upload due to an error that failed to write the file to disk.
- Unable to create directory wp-content/uploads/2016/03. Is its parent directory writable by the server?
Fix upload failed to write files to disk error in WordPress
Get your WordPress site connected through an FTP client.
This article uses FileZilla FTP Client for better understanding purposes as we need some FTP client. But if you are using a different FTP client, then it might look a bit different.
After you connect the FTP client, right click on the wp-content folder and choose the file permissions option.
Now you will see a dialogue box within your FTP client that has options for file permissions. It will have file permissions for owner, group, and public.
Enter 755 in the Numeric value area.
Then you must choose the checkbox next to “Recurse into subdirectories.”
The last step is to select the “Apply to directories only” option.
To continue, press the OK button.
All subfolders inside wp-content will now have their folder permissions changed to 755 by your FTP client. This includes the uploads folder, which stores all of your photographs.
Additionally, you should confirm that the file permissions for each file in your wp-content folder are accurate.
Now click on the wp-content folder and select file permissions. Now we will be changing the permissions of the files.
Enter 644 in the Numeric value area, and then check the box next to “Recurse into subdirectories.”
Finally, you need to make sure these are only for files, so click on ‘Apply to files only’ option.
Now select OK and continue. All files in your wp-content folder will be given 644 permission.
Now you can try uploading files again to your WordPress site.
If you still see this error, you need to contact your hosting provider and request that they clear the temporary files directory.
Because WordPress uploads images via PHP, it saves them in a temporary file directory on your web server. Then it will be shifted to the uploads folder of your WordPress site. But if this folder is poorly configured or runs out of storage, WordPress will not be able to write files to disk.
This temporary folder is on your server, and FTP typically won’t let you access it. You must speak with your web host and request that they empty it for you.
If you think this article was useful to you, then stay tuned with us and subscribe to receive our blogs. If you wish to stay connected with us on social media, you can find us on Facebook, Instagram and LinkedIn