Linux How to Upload a Folder Not Open
Feb 02, 2022
Domantas G.
3min Read
How to Ready the "Is its parent directory writable by the server?" WordPress Error
In this commodity, you are going to larn how to set up the "Is its parent directory writable by the server?" fault. It is a common upshot in WordPress that prevents you lot 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, nosotros're here to prove you how to fix this error quickly.
There are two methods of resolving the outcome on shared hosting — by changing the directory path and permissions of the uploads binder.
Method 1 – Changing the Uploads Binder Directory
Sometimes, the "Is its parent directory writable by the server?" upshot occurs because WordPress can't recognize the location of the uploads folder.
You lot might face up the problem later you take merely moved your site to another hosting provider. To fix it, you need to modify your WordPress config file:
- Access your hosting file manager or FTP, and search for the wp-config.php file. It is usually located in the root folder of your website (/public_html).
- Open the file and add the following lawmaking:
define( 'UPLOADS', 'wp-content/uploads' );
before this line:
require_once(ABSPATH . 'wp-settings.php');
- Salve the file. Now, effort to upload your media files again.
Method two – Changing Folder Permissions
If you lot still go the "Is its parent directory writable by the server?" fault after following Method ane, you might desire to try resetting the permissions of your uploads folder.
Simply follow the instructions below:
- Connect to your business relationship via an FTP customer or file manager. Go to the WordPress installation directory — commonly in /public_html.
- Open the wp-content folder and right-click on the uploads binder.
- Click on File Permissions. A new dialogue box will pop upwards. Look for the Numeric Value field and enter 755.
- Scroll down and brand sure the Recurse into subdirectories box is checked.
- Select Use to directories but and click OK.
By performing this method, y'all volition reset the permissions of the uploads folder and its subfolders to 755.
The number means the possessor of the file can read, write, and execute the file. This is important to let the directory to be writable. Hence, fixing the "Is its parent directory writable past the server?" error.
How to Set up "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, notation that this method only works for Linux running on Apache webserver.
Earlier we begin, let'south understand some basics. Past default, your Apache spider web server uses the www-information user and www-information grouping to admission files and folders.
Yet, in that location is a possibility that the uploads folder is not endemic by world wide web-data. This situation leads to the "Is its parent directory writable by the server?" upshot.
What you demand to do is change the owner of the uploads directory to www-information:
- Connect to your VPS via SSH. Yous can acquire how to do so in our SSH tutorial.
- Navigate to the wp-content folder inside your WordPress installation directory.
cd public_html/wp-content
- Change the owner and group of the uploads folder to www-information by executing this command:
chown -R www-data:www-information plugins
- Just similar on shared hosting, the default permissions for the uploads folder might be incorrect. Therefore, while you are within the wp-content folder, y'all may run the following control:
chmod 755 -R uploads
It volition set permissions for plugins and all subdirectories within it to 755.
If you desire to learn more than well-nigh 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, every bit configurations between hosting services may vary.
Conclusion
The "Is its parent directory writable past the server?" upshot can be frustrating because information technology won't allow you to upload files to your WordPress site. Thankfully, in this article, yous have learned the various solutions to this error, both on shared hosting and VPS.
The most mutual method is to change the owners and permissions of the uploads folder. If this pick 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 result. Expert luck!
Source: https://www.hostinger.com/tutorials/fix-the-is-its-parent-directory-writable-by-the-server-wordpress-error
0 Response to "Linux How to Upload a Folder Not Open"
Post a Comment