wordpress failed to write file to disk

How to Fix ‘Upload: Failed to write file to disk’ WordPress Error?

Is your site alerted with the error: “Upload: Failed to Write File to Disk?” If yes, it’s understandable how annoying an experience this could be. When you’re unable to upload new files, including images, and don’t know how to fix the issue, it leads to frustration. 

Incorrect folder permissions are one of the typical causes of this error. The good news is, the “WordPress failed to write file to disk” error is easily fixable once you know the steps. Once you’ve successfully resolved the error, uploading files to your media library as before becomes a breeze again.

Through this tutorial, you’ll learn why (the three possible scenarios) the WordPress failed to write file to disk error occurs, and then we’ll guide you through the potential solutions to fix the issue easily. 

When Does The “Upload: Failed to Write File to Disk” WordPress Error Occur?

There are three possible scenarios in which the “Upload: Failed to Write File to Disk” error can occur. The most common one is listed first:

1. Incorrect folder permissions

2. When your website exceeds the quota limit of the hosting plan

3. When the temporary folder is full or unavailable

All of the above error scenarios are easily fixable. The solutions to each of the above require you to follow a few easy steps. Let’s start with solution number 1, which is changing your upload folder’s permissions using an FTP client.

1.  Change Your Upload Folder’s File Permissions

This solution involves changing file permissions for your upload folder using an FTP client or your host’s control panel. The steps for resolving the issue using the free FileZilla FTP client are as follows (note: when using another FTP client, it would look different than the FileZilla screenshots shown below): 

Step 1 – Using an FTP client, visit your website, and go to the /wp-content/ folder >> uploads folder, to access the storage area of your WP media library. 

(Note: The storage area of your media uploads include all your image files as well.)

Step 2 – Select File Permissions by right-clicking on the uploads folder. 

As seen below, the file permissions dialog box will appear in your FTP client. Here you will see your owner, group, and public file permissions.

Fix Upload Failed to write file to disk WordPress Error

Step 3 – In the file permissions dialog box, to make your selections for the new attributes for the directory “uploads” and all the subdirectories within it, enter 755 in the “Numeric value” text box. 

Fix Upload Failed to write file to disk WordPress

Next, check the box next to “Recurse into subdirectories.” Checking this box ensures all the subdirectories within wp-content are also changed.

Finally, select the radio button next to “Apply to directories only.” This is because, at this stage, you wouldn’t want to change the permission of files themselves. 

Then click the ‘OK’ button and save your changes.

Performing this step ensures file permissions are applied to the directories (all the sub-folders inside wp.content) via the FTP client. 

Now that the folders are fixed, you would want to ensure the individual file permissions are correct in your wp-content folder.

Set Correct File Permissions For All Individual Files In Your Uploads Directory:

Step 1 –  Begin by selecting File Permissions by right-clicking on the uploads folder.

Step 2 – In the file permissions dialog box, make your selections for the new attributes for the directory “uploads” and all the subdirectories within it by entering 644 in the “Numeric value” text box.

Next, ensure you’ve checked the box next to the option that reads “Recurse into subdirectories,” and selected the radio button next to “Apply to files only.” Then, click the ‘OK’ button and save your changes. 

After successfully changing the permissions in all files of the uploads (wp-content) folder to 644 via the FTP client, you can now visit your WordPress site and try uploading files.

2. Check The Quota Limit Of Your Hosting Plan

If changing the file permissions hasn’t solved the problem, it could be because your website may have exceeded the quota limit of the web hosting service. The Quota limit is the maximum space for storage on your web server, allotted to your website by the web hosting plan. 

The amount of storage is determined by your web host provider. Whether your web host provider has allowed you shared, limited, or unlimited hosting space depends on the particular host and the plan selected. Exceeding the plan limit will result in the “Upload: Failed to Write File to Disk” WordPress error.

Some hosts may offer shared hosting with unlimited disk space; others may set extremely low limits. If you have a website quite rich in content, it’s not uncommon to end up exceeding the quota limit set by the hosting provider. 

The solution is to upgrade your hosting plan or delete unused/irrelevant files from the server using cPanel or FileZilla.

3. Empty the WordPress Temporary Files Folder

If you’re still experiencing the error, then you need to consider emptying your WordPress temporary files folder. For that, you will have to get in touch with your WordPress hosting provider and request them to empty the temporary files directory.

To put this in perspective, you need to understand the process of uploading content to your WordPress site. To upload files (including images and other content), WordPress uses PHP to first save the uploads to a temporary directory on your web server. Next, the uploaded files are moved to your WordPress uploads folder. When this temporary directory is filled to capacity or configured poorly, the “upload-failed to write file to disk” error will occur.

The temporary folder is a hidden file located on your web server, which is why it’s next to impossible to access it via FTP. Hence, you will have to get in touch with your web hosting provider and request them first to determine whether the temporary folder is full and then to empty it for you.

Final Thoughts

In this tutorial, we’ve outlined the causes of, and solutions to, the very common WordPress error: “Upload: Failed to Write File to Disk.” Depending upon the cause, the error is quite quick and easy to fix using these three potential solutions:

1. Fix Your Upload Folder’s File Permissions

2. Check The Quota Limit Of Your Hosting Plan

3. Empty the WordPress Temporary Files Folder

It’s important to recognize the issue and fix it immediately so that your website doesn’t slow down and cause user dissatisfaction. 

If you have other solutions or tips to share from your experience with the “upload – failed to write file to disk” WordPress error, use the comment section below to enlighten our readers.

If you gained from reading this tutorial, you might want to check out some of the other recent tutorials by us, including among them the following:

● How to Add Facebook Pixels on Your WordPress Website?

● How to Change Your WordPress Password?

● How to Install WordPress on Xampp? – Simple Steps

● How to Install WordPress via FTP? – Simple Guide

Leave a Comment

Your email address will not be published. Required fields are marked *