×


WordPress Upload Failed to Write File to Disk error

Are you facing  'Upload: Failed to write file to disk' error when uploading files in WordPress? 

This guide will help to fix it.


WordPress "Upload: Failed to Write File to Disk" error can occur for a number of reasons, but the most common is a folder permissions issue.

You can resolve the issue by resetting your WordPress file permissions, using an FTP client or cPanel File Manager.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix WordPress related errors.

In this context, we shall look into methods to resolve this WordPress error.


What triggers WordPress Failed To Write File To Disk Error ?

This error can occur due to a number of reasons. 

However, the most common one is incorrect folder permissions.

Each file and folder on your website has a set of permissions.

Your web server controls access to the files based on these permissions.

Incorrect permissions to a folder can take away your ability to write files on server. This means your web server cannot create or add new files to that particular folder.

If you try to upload images or any other files from WordPress admin area, you will get one of the following error messages:

i. WordPress failed to write to disk.

ii. WordPress has failed to upload due to an error failed to write file to disk.

iii. Unable to create directory wp-content/uploads/2016/03. Is its parent directory writable by the server?


Methods to fix WordPress Upload Failed to Write File to Disk error ?

You can apply the following tips to resolve this error.


1. First, you need to connect to your WordPress site using a FTP client.

Here, we are using the free FileZilla FTP client. If you are using some other FTP client, then it might look a little different.

2. Once you are connected, you need to right click on the wp-content folder and select file permissions.

3. This will bring up file permissions dialog box in your FTP client. It will show you file permissions for owner, group, and public.

You need to enter 755 in the numeric value field.

4. After that, you need to check the box next to 'Recurse into subdirectories'.

5. Lastly, you need to click on 'Apply to directories only' option.

Click on the OK button to continue.

Your FTP client will now set folder permissions to 755 and apply it to all sub-folders inside wp-content. 

This includes uploads folder where all your images are stored.

You also want to make sure that file permissions for individual files in your wp-content folder are correct.

6. Once again, right click on wp-content folder and select file permissions. This time we will change permissions for files.

7. Enter 644 in the numeric value and then check the box next to 'Recurse into subdirectories'.

Lastly, you need to click on 'Apply to files only' option.

8. Click on the OK button to continue. Your FTP client will now set file permissions to 644 for all files in wp-content folder.

You can now visit your WordPress site and try uploading files.


If you need to troubleshoot this error further, you should note that WordPress uploads your images using PHP which first saves the uploads to a temporary directory on your web server. After that it moves them to your WordPress uploads folder.

If this temporary directory is full or is poorly configured, then WordPress will not be able to write the file to disk.

This temporary folder is located on your server and in most cases you cannot access it using FTP. 

You will need to empty it to resolve this issue.


[Need urgent assistance to resolve WordPress related errors? We are available to help you. ]


Conclusion

This article will guide you on how to resolve 'Upload: Failed to Write File to Disk' Error in WordPress. 

The Upload: Failed to Write File to #Disk WordPress error can occur due to a number of reasons. 

The most typical cause of the error is incorrect folder permissions. 

But besides incorrect permissions, this error can also ocurr due to your website exceeding the quota limit of the hosting service.

To fix this #WordPress #error:

1. Try changing the permissions on the wp-content directory to 766. 

2. If you still have problems, try 767, 775 or 777. 

3. Once your uploads are working, change the permissions on wp-content back to 755 again and check that everything still works OK.