In this article, you will learn how to fix the “Is its parent directory writable by the server?” error. This is a common issue in WordPress that restricts you from uploading files to your website.
1. Fixing the “Is its parent directory writable by the server?” Error on Shared Hosting
- Method 1 – Changing the Uploads Folder Directory
- Method 2 – Changing Folder Permissions
2. Fixing the “Is its parent directory writable by the server?” Error on VPS
Fixing the “Is its parent directory writable by the server?” Error on Shared Hosting
The cause of the error can be incorrect permissions, ownerships, or location of the uploads folder. But no matter what the cause is, you will learn to fix this error quickly via this article.
You can resolve this error on shared hosting via two methods — by changing the directory path and permissions of the uploads folder.
Method 1 – Changing the Uploads Folder Directory
Sometimes, when the 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).
- Open the file and include the below code:
1define( 'UPLOADS', 'wp-content/uploads' );
prior to this line:
1require_once(ABSPATH . 'wp-settings.php');
- Save the file and try to upload your media files again.
Method 2 – Changing Folder Permissions
After following the above method, still you get “Is its parent directory writable by the server?” error, try to reset the permissions of your uploads folder.
Just follow the instructions below:
- Using an FTP client or file manager, connect to your account.
- Navigate to the WordPress installation directory — commonly in /public_html.
- Now, open the wp-content folder and right-click on the uploads folder.
- Then click on File Permissions and a new dialogue box will pop up. Go to the Numeric Value field and enter 755.
- Scroll down and check the Recurse into subdirectories box.
- Select Apply to directories only and click OK.
With this method, the permissions of the uploads folder and its subfolders will be reset to 755.
The number indicates the owner of the file can read, write, and run the file. This is essential for allowing the directory to be writable. This will resolve the “Is its parent directory writable by the server?” error.
Fixing the “Is its parent directory writable by the server?” Error on VPS
In case your WordPress site is hosted on VPS, you can try the following solution to fix “Is its parent directory writable by the server?” error. But, remember this method only works for Linux running on Apache web server.
Prior to starting, let’s learn some basics. By default, the Apache web server uses the www-data user and www-data group to access files and folders.
On the other hand, it can be that the uploads folder is not owned by www-data. This situation gives the error as “Is its parent directory writable by the server?”.
In order to change the owner of the uploads directory to www-data you need to follow the below steps:
- Using SSH, connect to your VPS.
- Go to the wp-content folder located within your WordPress installation directory.
- Change the owner and group of the uploads folder to www-data by running the below command:
1chown -R www-data:www-data plugins
- Similar to shared hosting, the default permissions for the uploads folder might be incorrect. Therefore, when you are within the wp-content folder, you can run the following command:
1chmod 755 -R uploads
With this permissions for plugins and all subdirectories inside it will be set to 755.
This solution won’t not work if you switched over to a new hosting provider, as configurations between hosting services can vary.
You might get frustrated due to the “Is its parent directory writable by the server?” issue because it won’t allow you to upload files to your WordPress site. Fortunately, in this article, you have learned the different solutions to this error, both on shared hosting and VPS.
Changing the owners and permissions of the uploads folder is the most commonly used method. If this option doesn’t work, you may need to modify the uploads directory or the wp-config.php file.
Hope that by following this guide, you can quickly fix the issue. Good luck!