WordPress Tutorial

How to fix the ‘Is its parent directory writable by the server?‘ WordPress Error

How to fix the ‘Is its parent directory writable by the server?‘ WordPress Error

Introduction

An issue commonly faced by many WordPress developers is the Is its parent directory writable by the server? error.

Is its parent directory writable by the server? error Example

The first instinct of many developers is to double-check the permissions of the uploads folder on the server. And while this may be enough to fix it in some cases, there are several other reasons for this error to occur. For instance, there is a chance for this error to appear if you’ve recently migrated your WordPress site to a new web hosting provider. No matter what’s causing the error, in this tutorial, you will learn how to fix it in a matter of minutes.

[optin-monster-shortcode id="cgx87nzwxn0himxw62bn"]

Option 1 – Changing Uploads Directory In WordPress Settings

If you have moved your WordPress to a new hosting recently. There is great chance that path to your WordPress uploads directory is incorrect. A simple place to begin troubleshooting is to check the WordPress settings section.

To do this, sign in as admin on WordPress. Then, in the Settings tab, select Media. Under the section titled Uploading Files, you should see a field named Store uploads in this folder.  Now check the path to Uploads directory. For example at Hostinger WordPress hosting full path to WordPress uploads directory would be similar to:

Fixing is its parent directory writable by the server? in WP Admin Area

You can use File Manager or FTP client to check whether or not the path to uploads directory is correct. Simply navigate to the said folder and check it’s path. With Hostinger File Manager you can see the path on the top left side of the screen:

Path to Uploads Folder on Hostinger File Manager

Once you are sure that uploads directory in WordPress settings is correct press Save button and try to upload files again.

You can also achieve this by editing WordPress config file, especially if you’re unable to see the uploads directory field in WordPress admin area. Use File Manager or FTP and open up the wp-config.php file for editing. And add the following code:

This code should be included before this line:

Now try to upload media files again. If you still get error proceed to Option 2.

Option 2 – Changing Folder Permissions

Still getting the Is its parent directory writable by the server? error even after following Option 1? Well, you may be better off trying to reset the folder permissions of your uploads folder. For this, you can use an FTP client, like FileZilla or File Manger as well. Follow these steps to reset folder permissions using FileZilla:

  1. Connect to your account with FileZilla.
  2. Go to WordPress installation directory (in most cases it’s public_html) and open wp-content folder.
  3. Once inside, right-click on the Uploads directory.
  4. Click on File Permissions, which will prompt open a dialog box.
  5. Here, find the Numeric value field, and enter 755.
  6. Check the Recurse into subdirectories option if not already checked.
  7. Select Apply to directories only from the radio buttons.
  8. Click OK.
    Changing Folder Permissions on FileZilla

Performing this will not only reset the permissions of the uploads folder to 755, but also do so for sub-folders inside this parent folder. As mentioned in the introduction to this tutorial, resetting the folder permissions can solve this error in a few cases.

Finally, if both of these methods don’t work, you can try this slightly quirky workaround: change the permissions of the uploads folder from the default 755 to 777.

Change Uploads Folder Permissions to 777

This will give everyone access to read/write into the folder. Now, upload a file in that folder. Afterwards, revert the permission back to 755. 

Option 3 – Fixing Is its parent directory writable by the server? Error on VPS

Before you begin with this method see our tutorial on how to change permissions and owners via command line.

If you are hosting your WordPress on VPS and have SSH access, you can try this solution. Do note that this is for a Linux VPS running Apache web server.

Before we begin, let’s understand some background: by default, your Apache web server uses the www-data user and www-data group to access files and folders. There is a possibility that the uploads folder is not actually owned by www-data, which would naturally prevent it from writing to the folder. What you want to do is make this user the owner of the uploads directory.

To do this, you must use the shown Linux command:

  1. First of all, connect to your VPS via SSH (chick for tutorial).
  2. Navigate to wp-content folder. We assume that your WordPress is installed in public_html directory:
  3. Now change owner and group to www-data:

Just like on shared hosting account, it’s possible that folder permissions are not sufficient for WordPress to write inside plugins folder. While you are inside wp-content folder, run the following command:

This command will set permissions for plugins and all subdirectories inside it to 755.

This solution works if you switched over to a new hosting provider, as configurations between hosting services might vary.

Conclusion

Getting the Is its parent directory writable by the server? error can be discouraging, especially if you’re only go-to move is changing permissions of the uploads folder. In this tutorial, we saw how to fix this error using multiple techniques. By following the steps in this guide, you have hopefully gotten rid of this error.

If you liked this WordPress tutorial, be sure to check others here.

Join thousands of subscribers worldwide

and get awesome deals & the newest tutorials to your email

Please wait...

Thank you for sign up!

More in WordPress Tutorial
WordPress do+shortcode
How To Use WordPress do_shortcode

Close