Upload: Failed to Write File to Disk:

Sometimes when you try to upload a media to the website, WordPress will you throw you the error called “Upload: Failed to Write File to Disk”.This is an error which is very easy to fix. It will occur due to many reasons. The most common cause is incorrect folder permissions. In WordPress, there is a set of permissions allowed for each and every file. These permissions are used for the web server to accessing the files. Incorrect permission to a file or folder can lead to the inability of writing files in the server. In this article, we will show you some of the various methods to fix the Upload: Failed to Write File to Disk error.

Changing permissions:

You can change permissions of files and folders by three methods. Here we have given a brief explanation of that.

1. Changing permissions via FTP:

You can change the file/folder permission by using FTP clients. For that, you need to connect to the FTP client. Then go to the wp-content folder and click uploads folder. Select the file permissions and a new dialogue box will open up. In numeric value filed, you need to enter 755 and check the box “Recurse into subdirectories”. After that choose “Apply to directories only” in the submenu and then click ok button. This will set folder permissions to 755. Next, you need to change the file permissions. So go to the wp-content folder and select file permissions. But this time enter 644 in Numeric value and check the box “Recurse into subdirectories”. But this time you need to select “Apply on files only” and click ok button. Now go and check the WordPress site and try uploading files. This is one of the methods used for changing the permissions.

2. Changing permissions via cPanel:

You can change the permissions via cPanel also. For that, you need to login into your cPanel and then goto wp-content folder. Inside that, you need to click on the Uploads folder and select the folder. Right-click on the folder, you can find permissions button. Change it to 755 for this folder and save it. Now try to upload the media, if the error still persists you should check the permissions for all the files and folders individually.

3. Changing permissions via SSH:

You can change permissions via SSH commands also. First of all, access your wp-content folder by using the following command. If it is present in the public_html folder means to execute the following command.
cd public_html
Now change the folder permissions with the below command.
chmod 755 wp-content.
This will set the permission of the wp-content folder to 755. If you want to set the same permissions to all the files and folders, simply add the R flag before 755 in the above command. Now try to upload the media if the error is resolved, keep the permission as it is. If the error persists again, try the below methods.

Checking Quota:

Space limit exceeded can also cause the Upload: Failed to Write File to Disk Error. Some of the hosting providers don’t give you the unlimited disk space. In such cases, if your website content is rich means you will face this error. So check your disk space and try to upload the media again. If the disk space is not enough in the sense you need to contact your hosting provider.

Checking the Temporary folder:

Sometimes Temporary folder’s capacity can cause the Upload: Failed to Write File to Disk Error. You need to check the temporary folder in the wp-content folder. If it is filled its maximum capacity, you need to contact your hosting provider. They know about the cleaning up the temporary folder and disk space.
We hope that this article will help you to solve the error. For more information, follow us on Twitter and Facebook.

Categorized in:

Tagged in:

,