How to Fix the “Is its parent directory writable by the server?” WordPress Error
access_time
hourglass_empty
person_outline

How to Fix the “Is its parent directory writable by the server?” WordPress Error

In this article, you are going to learn how to fix the “Is its parent directory writable by the server?” error. It is a common issue in WordPress that prevents you from uploading files to your website.

How to Fix “Is its parent directory writable by the server?” Error on Shared Hosting

The example of "Is its parent directory writable by the server?" issue.

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 the issue on shared hosting — by changing the directory path and permissions of the uploads folder.

Method 1 – Changing the Uploads Folder Directory

Sometimes, the “Is its parent directory writable by the server?” issue occurs because WordPress can’t recognize the location of the uploads folder.

You might face the problem after you have just moved your site to another hosting provider. To fix it, you need to modify your WordPress config file:

  1. Access your hosting file manager or FTP, and search for the wp-config.php file. It is commonly located in the root folder of your website (/public_html).
    The location of wp-config.php file
  2. Open the file and add the following code:
    define( 'UPLOADS', 'wp-content/uploads' );

    before this line:

    require_once(ABSPATH . 'wp-settings.php');
  3. Save the file. Now, try to upload your media files again.

Method 2 – Changing Folder Permissions

If you still get the “Is its parent directory writable by the server?” error after following Method 1, you might want to try resetting the permissions of your uploads folder.

Simply follow the instructions below:

  1. Connect to your account via an FTP client or file manager. Go to the WordPress installation directory — commonly in /public_html.
  2. Open the wp-content folder and right-click on the uploads folder.
  3. Click on File Permissions. A new dialogue box will pop up. Look for the Numeric Value field and enter 755.
  4. Scroll down and make sure the Recurse into subdirectories box is checked.
  5. Select Apply to directories only and click OK.

By performing this method, you will reset the permissions of the uploads folder and its subfolders to 755.

The number means the owner of the file can read, write, and execute the file. This is important to allow the directory to be writable. Hence, fixing the “Is its parent directory writable by the server?” error

There is another workaround. However, you should follow these steps only if the method above doesn’t work. In this example, we will show you how to do it on Hostinger File Manager:

  1. Log in to your Hostinger shared hosting account. Navigate to the Files section and select File Manager.
  2. Right-click on your uploads folder and choose Permissions.
  3. Check all the boxes for all user types, which change the folder permissions to 777. Then, tap Change.
    Permissions of the uploads folder (777)
  4. Right-click on the folder again and uncheck Group’s and Others’ permissions to write on the folder. Doing this will change the folder permissions back to 755 — lastly, press Change.
    Permissions of the uploads folder (755)

How to Fix “Is its parent directory writable by the server?” Error on VPS

If your WordPress site is hosted on VPS, you can try the following solution to fix “Is its parent directory writable by the server?” error. However, note that this method only works for Linux running on 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.

If you want to learn more about how to change Linux folder ownerships and permissions via the command line, read this guide.

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

Conclusion

The “Is its parent directory writable by the server?” issue can be frustrating because it won’t allow you to upload files to your WordPress site. Thankfully, in this article, you have learned the various solutions to this error, both on shared hosting and VPS.

The most common method is to change the owners and permissions of the uploads folder. If this option doesn’t work, you may want to modify the uploads directory or the wp-config.php file.

Hopefully, by following this guide, you can quickly fix the issue. Good luck!

The Author

Author

Domantas G. / @domantas

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Related tutorials

Author

Steven Peters Reply

July 25, 2018

Thank you so very much! Option 1 worked perfectly for me and was very easy the way you explained it. You rock!

    Author

    Gediminas B.

    Replied on August 03, 2018

    That's awesome, Steven! I'm happy to hear you were able to fix your website ;)

Author

Ibrahim Reply

September 17, 2018

Thank you so very much. This guide is a life saver!

Author

Jawwad Hussain Reply

November 29, 2018

Thanks for sharing! Option 1 worked for me ;)

Author

Joe Reply

December 21, 2018

Thanks for this. I recently migrated my website and got the error. Option 1 - adding the line of code to the wp-config.php file worked for me.

Author

Willhowdy Reply

January 03, 2019

I have solved my problem using option 1. Thanks a lot!

Author

Some Coder Reply

March 25, 2019

Thank you so much. Option 1 – adding the line of code to the wp-config.php file worked for me.

Author

Alan Reply

May 25, 2019

Awesome. Thank you. The first option did the trick for me after tying folder permissions.

Author

Matt Reply

September 25, 2019

Fantastic article! It's 10pm and this was the last issue to deal with on launch day!! :-( :-) Thanks so much

Author

Naser Reply

October 24, 2019

Hey Domantas, I was about to pull my hair trying to figure out where I did wrong with permissions and your option 1 came to the rescue. Thanks a lot!

Author

Ike Reply

November 05, 2019

Option 1 worked after weeks of following complicated advice from other sites and failing each time. Wow. Thanks a bunch!

Author

Wasif Khan Reply

November 22, 2019

Thank you so very much! Option 1 worked perfectly for me as well. Great work.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Become a part of Hostinger now!

More in WordPress
How to Debug and Fix 503 Service Unavailable Error in WordPress

Close