Unable to Create Directory Wp-content/uploads/. Is Its Parent Directory Writable by the Server?
Feb 02, 2022
Domantas G.
3min Read
How to Fix the "Is its parent directory writable by the server?" WordPress Error
In this article, you lot are going to larn how to fix the "Is its parent directory writable by the server?" mistake. It is a common issue in WordPress that prevents you from uploading files to your website.
Download WordPress Cheat Canvas
The fault can happen due to wrong permissions, ownerships, or location of the uploads folder. Regardless of the crusade, 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 folder.
Method 1 – Changing the Uploads Folder Directory
Sometimes, the "Is its parent directory writable by the server?" issue occurs because WordPress tin't recognize the location of the uploads folder.
You might face the problem after you lot have just moved your site to another hosting provider. To fix information technology, 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 ordinarily located in the root folder of your website (/public_html).
- Open the file and add the following code:
define( 'UPLOADS', 'wp-content/uploads' );
before this line:
require_once(ABSPATH . 'wp-settings.php');
- Save the file. At present, try to upload your media files once again.
Method 2 – Changing Folder Permissions
If you still go the "Is its parent directory writable by the server?" error subsequently following Method 1, you lot might want to try resetting the permissions of your uploads binder.
Simply follow the instructions below:
- Connect to your account via an FTP client or file manager. Go to the WordPress installation directory — commonly in /public_html.
- Open the wp-content folder and right-click on the uploads folder.
- Click on File Permissions. A new dialogue box will pop up. Look for the Numeric Value field and enter 755.
- Curl down and make certain the Recurse into subdirectories box is checked.
- Select Utilise to directories only and click OK.
By performing this method, you lot 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 past the server?" error.
How to Prepare "Is its parent directory writable by the server?" Error on VPS
If your WordPress site is hosted on VPS, y'all tin can try the following solution to set up "Is its parent directory writable by the server?" error. However, annotation that this method only works for Linux running on Apache webserver.
Before we brainstorm, allow's sympathize some basics. By default, your Apache web server uses the www-data user and www-data grouping to access files and folders.
However, in that location is a possibility that the uploads binder is not owned past www-data. This state of affairs leads to the "Is its parent directory writable by the server?" outcome.
What you need to do is alter the owner of the uploads directory to world wide web-data:
- Connect to your VPS via SSH. You can larn how to do so in our SSH tutorial.
- Navigate to the wp-content folder within your WordPress installation directory.
cd public_html/wp-content
- Change the possessor and group of the uploads binder to www-data by executing this command:
chown -R world wide web-information:www-information plugins
- Just like on shared hosting, the default permissions for the uploads folder might be wrong. Therefore, while y'all are inside the wp-content folder, y'all may run the post-obit control:
chmod 755 -R uploads
Information technology will set permissions for plugins and all subdirectories within it to 755.
If you lot desire to learn more about how to change Linux binder ownerships and permissions via the command line, read this guide.
The solution above might non piece of work if y'all switched over to a new hosting provider, every bit configurations between hosting services may vary.
Decision
The "Is its parent directory writable by the server?" issue tin can be frustrating considering it won't let y'all to upload files to your WordPress site. Thankfully, in this article, you have learned the diverse solutions to this error, both on shared hosting and VPS.
The most mutual method is to change the owners and permissions of the uploads binder. If this selection doesn't piece of work, yous may desire to modify the uploads directory or the wp-config.php file.
Hopefully, past following this guide, you tin chop-chop fix 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 "Unable to Create Directory Wp-content/uploads/. Is Its Parent Directory Writable by the Server?"
Post a Comment