close
uploadfailed

If you are seeing ‘Upload: Failed to write file to disk’ error when uploading files in this can be a bit frustrating for users and obviously they would want to get rid of it.

What Causes Failed To Write File To Disk Error in WordPress?

This can occur for a number of reasons but the most common one is incorrect folder permission.

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:

  • 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/2016/03. Is its parent directory writable by the server?

Fix Upload Failed to Write to Disk Error in WordPress

First connect to your WordPress sit using a FTP client. We are using the free FileZilla FTP client. If you are using some other FTP client, then it might look a little different.

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

ftpfilepermissions

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

filepermissions1

Enter the 755 in the numeric value field.

Check the box next to ‘Recurse into subdirectories’.

Now click on the ‘Apply to directories only’ option.

Click on the OK button.

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.

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

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.

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 still see the error, then you will need to contact your WordPress hosting provider and ask them to empty the temporary files directory.

WordPress uploads your images using PHP which first save 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 contact your web host and ask them to empty it for you.

 

 

Tags : failed to write file to diskwordpressWordPress how to
Nooruddin Ahmed

The author Nooruddin Ahmed

An avid football fan. Lives for the weekend game.Aviation enthusiast. Believes in letting bygones be bygones.

Leave a Response