February 4, 2019
3 min Read
February 4, 2019
3 min Read
An issue commonly faced by many WordPress developers is the Is its parent directory writable by the server? error.
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.
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:
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:
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:
define( 'UPLOADS', 'wp-content/uploads' );
This code should be included before this line:
require_once(ABSPATH . 'wp-settings.php');
Now try to upload media files again. If you still get error proceed to Option 2.
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:
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.
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.
Before you begin with this method see our tutorial on how to change permissions and owners via command line.
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:
chown -R www-data:www-data plugins
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:
chmod 755 -R uploads
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.
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.
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!
Replied on August 03, 2018
That's awesome, Steven! I'm happy to hear you were able to fix your website ;)
September 17, 2018
Thank you so very much. This guide is a life saver!
November 29, 2018
Thanks for sharing! Option 1 worked for me ;)
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.
January 03, 2019
I have solved my problem using option 1. Thanks a lot!
March 25, 2019
Thank you so much. Option 1 – adding the line of code to the wp-config.php file worked for me.
May 25, 2019
Awesome. Thank you. The first option did the trick for me after tying folder permissions.
September 25, 2019
Fantastic article! It's 10pm and this was the last issue to deal with on launch day!! :-( :-) Thanks so much