How to fix-“is its parent directory writable by the server”

Most of the times, when you migrate a site from one hosting company to another and start making any changes like installing a plugin or something similar, you might get an error “Is Its Parent Directory Writable By The Server”. This error usually prevents you from uploading anything on your site.

It’s directly associated with the wp-content folder of a WordPress site because that’s where every media file, plugin, and theme gets uploaded to be stored. It might be happening because of the wrong path or folder permissions.

The error can happen due to incorrect permissions, ownerships, or location of the uploads folder. Regardless of the cause, we’re here to show you how to fix this error quickly.

There are two methods of resolving shared hosting — by changing the directory path and permissions of the uploads folder.

Method 1:

Change Folder Permissions

As you may already know, WP-CONTENT is a folder in the core of WordPress software that you have installed on your hosting company to use the WordPress CMS to manage a site. So, you have to make sure that folder permissions for WP-CONTENT are correct.

Here are a few steps you have to follow:

Log into your hosting account and open the [tool]cPanel

 Click on the File Manager because all files and folders of your WordPress site are stored in it.

From the left sidebar, click on “public_HTML” because most sites are stored in it.

Right-click on the wp-content folder and choose “Change Permissions”.

On the popup, make sure permissions are 755.

Save changes.

After making these changes, please try to install the plugin you’re doing earlier. It’s always a good idea to clear your browser’s cache or use a different browser.

Sometimes, a browser’s old cache or version prevents you from making such changes. If everything works, you don’t need to try the second method. If you still get an error “Is Its Parent Directory Writable By The Server”, please follow the second method.

Method 2:

Update/Change the Uploads

Sometimes, when WordPress can’t recognize the location of the uploads folder, it gives the error as “Is its parent directory writable by the server?”.

This problem might occur when you just moved your site to another hosting provider. For this, you need to modify your WordPress config file:

Go to your hosting File Manager or FTP, and search for the wp-config.php file. You will find it in the root folder of your website (/public_html).

 Directory Settings

This is the easiest option to try and solve this error, so you should try this one first.

Log into your WordPress admin dashboard.

Go to the Media Settings menu (Settings -> Media)

Enter wp-content/uploads in the “Store uploads in this folder” text box

Save the changes by hitting the “Save Changes” button, and you are done

The important thing here is to make sure you only enter the following in the “Store uploads in this folder” field:

wp-content/uploads

Now you are done, go and try to upload files to the media library again.

Method 3:

 Use This If WordPress site is hosted on VPS

If your WordPress site is hosted on VPS, you can try the following solution to fix the “Is its parent directory writable by the server?” error. However, note that this method only works for Linux running on the Apache webserver.

Before we begin, let’s understand some basics. By default, your Apache web server uses the www-data user and www-data group to access files and folders.

However, there is a possibility that the uploads folder is not owned by www-data. This situation leads to the “Is its parent directory writable by the server?” issue.

What you need to do is change the owner of the uploads directory to www-data:

1. Connect to your VPS via SSH. You can learn how to do so in our SSH tutorial.

2. Navigate to the wp-content folder inside your WordPress installation directory.

cd public_html/wp-content

3. Change the owner and group of the uploads folder to www-data by executing this command:

chown -R www-data:www-data plugins

4. Just like on shared hosting, the default permissions for the uploads folder might be incorrect. Therefore, while you are inside the wp-content folder, you may run the following command:

chmod 755 -R uploads

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

The solution above might not work if you switched over to a new hosting provider, as configurations between hosting services may vary.

Method 4:

 Use This for XAMPP (LocalHost Installs)

If you’ve installed WordPress locally and faces the error message and none of the above solutions fixed your problem. You may need to reset the ownership of the installation to nobody by doing the following.

Run command line/terminal:

On Mac: Applications => Utilities => Terminal

On Windows: Start => Programs => Accessories => Command Prompt

Run the following command

After replacing WordPress with your actual WordPress installation directory.

sudo chown -R nobody:staff /applications/xampp/xamppfiles/htdocs/wordpress 

Isn’t it frustrating to get an error after setting up a new site or moving to a new web hosting company? Sometimes, you might blame your new hosting company for getting such an error, but they don’t have anything to do with it. It happens with the WordPress software and its path to the Uploads directory.

Now and then, we all face some issues with our sites. I have encountered some unknown errors. When I got “Is Its Parent Directory Writable By The Server” on a site, it’s unexpected and strange because I had never seen such an error. The same can happen to you.

The most important thing is to understand the concept and make sure you do the right thing using any of the methods mentioned above.

Leave a Comment

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