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
I personally faced this issue a while back and wrote a quick fix tutorial on this subject. However, a lot has changed since then so it is time to publish an updated version of the tutorial.
There are a few different possibilities for this error to show up. I will try to cover all the possibilities so hopefully one of them will help you fix the issue.
Fix #1: Update/Change the Uploads Directory Settings
This is the easiest option to try and solve this error so you should try this one first.
- Log into your WordPress admin dashboard
- Go to Media Settings menu (Settings -> Media)
- Enter wp-content/uploads in the “Store uploads in this folder” text box
- Save the changes by hitting the “Save Changes” button and you are done

The important thing here is to make sure you only enter the following in the “Store uploads in this folder” field:
wp-content/uploads
Fix #2: Manually Change the Folder Permission
If the above fix doesn’t work then try this option. This method requires you to change the file/folder permissions on your server. If you don’t know how to do this then read the tutorial on how to change permissions.
- Change folder permissions on the wp-content directory to 775 and try the upload again
- If it fails, change the permissions to 777 and try again
- if it still fails then do step 1 and 2 for the “wp-content/uploads” directory too
Once you can successfully create the folder and upload the media, be sure to return the permissions on wp-content directory to 755 (your folders should have a permission of 755 for security reasons).

Fix #3: Use This If Your Server is Using Ubutu
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: Try This If Running PHP in Safe Mode
If your server is running PHP in safe mode then know that it won’t allow you to create files or directories if your PHP scripts and upload directories belong to different users. So try one of the following solutions:
- Change the owner of scripts and upload directories (your hosting provider can do this for you)
- Disable PHP safe mode (your hosting provider can do this for you)
Fix #5: Use This for XAMPP (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
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.
Please feel free to share any other techniques/fixes for this error in the comment section below.















Thank you so much. The First one worked for my website. Appreciate your cooperation.
Thank you very much. This was the solutions (Fix #1) that worked for my localhost installation with xampp on Windows 7. It’s a pitty that most solutions that you find on google are all about editing code (define(‘FS_METHOD’, ‘direct’);) to the wp-config.php and changing permissions.
I had the same issue with the latest wp-update. WP nor plugins would auto-update.
None of the solutions mentioned here worked. What did work was:
– deactivate all plugins,
– put the rights all to 777,
– check for the wp-config (change the rights settings to 0777 there as well)
– do a manual ftp upgrade of WP,
– do a auto-upgrade of the still deactivated plugins,
– reactivate the plugins and
– put the rights to the previous settings (folders, files and wp-config).
I don’t know why this works, but it is the second site that had this problem, and it worked twice.
Thanks so much for taking the time to share your knowledge. This problem was driving me crazy as it was on a subdomain installation I used your Fix #1 above and all my frustration and stress just simply disappeared. Thanks again for sharing your knowledge.
Thank you for publishing this. I found the problem emerged when I changed webhosts. The media settings were specific to my previous host.
i.e /oldusername/website/wp-content/uploads
It worked like a charm. I was wondering for long for this. Thanks
Fix #1 fixed the problem for me.
Thanks!
Thanks for the options to fix this. I had installed an old version of WP a while ago and then updated it recently… after which I was unable to upload images. Your Fix number #1 solved my problem in an instant!! After I spent an hour or so looking around for a solution elsewhere. Many thanks!
Thank you for the fix! Worked like a charm.
Thank you for taking the time to post the tips.
I did your recommended fix #1 which required me to delete a single extra backslash at the beginning of “(/)wp-admin/uploads” and that fixed the frustrating problem. Cheers!
Thank you so much for this article, fixed my problems right away!
Thank you very much for this great tutorial. This was easy to understand and i was able to fix this directory creation problem that has been frustrating me for hours.
Brilliant Site..Thanx, went through a lot of site but I couldn’t get the help I needed. Found it here…Keep up the good work…
If your server is running PHP in safe mode then know that it won’t allow you to create files or directories if your PHP scripts and upload directories belong to different users.