HomeWordpress FixesHow to Fix the Unable to create directory Is its parent directory...

How to Fix the Unable to create directory Is its parent directory writable by the server

If you are seeing any of the following errors when you try to upload/import media into WordPress’s media library then this tutorial is for you. It will show you how to fix this annoying error.

  • Unable to create directory wp-content/uploads
  • Unable to create directory /wp-content/uploads/ Is its parent directory writable by the server?
  • Unable to create directory wp-content/uploads/2013/02

Try these tips to fixing this issue.

Fix #1 – Changing Uploads Directory In WordPress Settings

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.

  1. Enter wp-content/uploads in the “Store uploads in this folder” text box
  2. Save the changes by hitting the “Save Changes” button and you are done

Fix #2 – Changing Folder Permissions

Try 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:

  1. Connect to your account with FileZilla.
  2. Go to WordPress installation directory (in most cases it’s public_html) and open wp-content folder.
  3. Once inside, right-click on the Uploads directory.
  4. Click on File Permissions, which will prompt open a dialog box.
  5. Here, find the Numeric value field, and enter 755.
  6. Check the Recurse into subdirectories option if not already checked.
  7. Select Apply to directories only from the radio buttons.
  8. Click OK.

Fix #2 – If your server use UBUNTU

The webserver (Apache) runs as user www-data and group www-data by default on a Ubuntu system. If the files/folders are not owned by this user (www-data) then the webserver will be unable to write changes to them.

Change the filesystem permission on the folder (where the web application wants to write to) to the “parent directory” as mentioned in the error message.

For example, do (prepend with sudo if you’re not the current owner and need to elevate your own permissions in order to do it):

chown www-data /path/to/directory

to make www-data the owner which makes it writeable usually, or another approach via groups:

chgrp www-data /path/to/directory
chmod g+w /path/to/directory

Fix #4: Use This for XAMPP, WAMP or (LocalHost Installs)

If you have installed XAMPP to run WordPress on your local PC for testing and you are seeing this error then try the following.

Reset the ownership of the WordPress instillation to nobody. You can do this by running the a command in the command line/terminal.

  • Windows System: Start -> Programs -> Accessories -> Command Prompt
  • Mac: Applications ->Utilities -> Terminal
The command you need to run is the following (change “wp” to the actual directory name in your installation):

sudo chown -R nobody:staff /applications/xampp/xamppfiles/htdocs/wp

Hopefully one of the above solutions should help you fix the unable to create directory error in WordPress.

RELATED ARTICLES
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
- Advertisment -

Latest

0
Would love your thoughts, please comment.x
()
x