What Does It Mean if It Says Cant Create Directory When I Try to Upload a Plugin to Wordpress
February 02, 2022
Domantas G.
3min Read
How to Gear up the "Is its parent directory writable by the server?" WordPress Mistake
In this commodity, y'all are going to learn how to fix the "Is its parent directory writable past the server?" error. It is a common issue in WordPress that prevents you from uploading files to your website.
Download WordPress Cheat Sheet
The error can happen due to incorrect permissions, ownerships, or location of the uploads binder. Regardless of the cause, we're here to show you how to prepare this fault quickly.
There are two methods of resolving the issue on shared hosting — by changing the directory path and permissions of the uploads binder.
Method ane – Irresolute the Uploads Folder Directory
Sometimes, the "Is its parent directory writable past the server?" issue occurs because WordPress can't recognize the location of the uploads binder.
You lot might face up the trouble after yous have just moved your site to another hosting provider. To gear up it, y'all need to modify your WordPress config file:
- Access your hosting file managing director or FTP, and search for the wp-config.php file. It is ordinarily located in the root folder of your website (/public_html).
- Open up the file and add together the following code:
define( 'UPLOADS', 'wp-content/uploads' );
before this line:
require_once(ABSPATH . 'wp-settings.php');
- Save the file. Now, endeavor 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 afterward post-obit Method 1, y'all might want to effort resetting the permissions of your uploads folder.
Simply follow the instructions below:
- Connect to your account via an FTP client or file manager. Get to the WordPress installation directory — commonly in /public_html.
- Open up the wp-content folder and right-click on the uploads folder.
- Click on File Permissions. A new dialogue box will popular up. Await for the Numeric Value field and enter 755.
- Ringlet downward and brand certain the Recurse into subdirectories box is checked.
- Select Use to directories only and click OK.
By performing this method, you volition reset the permissions of the uploads binder and its subfolders to 755.
The number means the possessor of the file can read, write, and execute the file. This is important to allow the directory to exist writable. Hence, fixing the "Is its parent directory writable by the server?" error.
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 past the server?" error. However, annotation that this method only works for Linux running on Apache webserver.
Before we begin, let's empathise some basics. By default, your Apache web server uses the www-data user and www-data group to admission files and folders.
All the same, there is a possibility that the uploads folder is non owned by www-data. This situation leads to the "Is its parent directory writable past the server?" effect.
What you demand to do is change the possessor of the uploads directory to www-data:
- Connect to your VPS via SSH. You can learn how to exercise so in our SSH tutorial.
- Navigate to the wp-content folder within your WordPress installation directory.
cd public_html/wp-content
- Change the owner and group of the uploads folder to www-data past executing this command:
chown -R world wide web-data:www-data plugins
- Just similar on shared hosting, the default permissions for the uploads folder might exist incorrect. Therefore, while you are inside the wp-content binder, you may run the following command:
chmod 755 -R uploads
It volition set permissions for plugins and all subdirectories inside information technology to 755.
If you desire to larn more than virtually how to change Linux folder ownerships and permissions via the command line, read this guide.
The solution above might not work if y'all switched over to a new hosting provider, equally configurations betwixt hosting services may vary.
Decision
The "Is its parent directory writable by the server?" issue can be frustrating because information technology won't allow you to upload files to your WordPress site. Thankfully, in this article, you have learned the various solutions to this mistake, both on shared hosting and VPS.
The most common method is to modify the owners and permissions of the uploads binder. 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, yous can rapidly set the result. Good luck!
Source: https://www.hostinger.com/tutorials/fix-the-is-its-parent-directory-writable-by-the-server-wordpress-error
0 Response to "What Does It Mean if It Says Cant Create Directory When I Try to Upload a Plugin to Wordpress"
Post a Comment