
After migrating WordPress Made Easy from GoDaddy to SiteGround WordPress Hosting, I started to write a new post as usual. While trying to add an image to the new post, the upload process failed and this error message appeared:
Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server.
In the beginning, I thought that the cause of the problem might be the lack of permissions on the new server.
I connected to my FTP server using FileZilla and started to check the wp-content/uploads via FTP and I found that the folder of the current month is present.
After that, I thought the cause of the problem may be file permissions as WordPress was unable to write/edit the parent folder, so I changed the permissions via FTP.
However, I still couldn’t upload files to WordPress media library and still getting “Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server” error when I try to upload the files even after using another browser to write the new post.
How to solve “Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server” error
The cause of this error is that the wp-content/uploads folder does not exist because when I installed WordPress on the old server it automatically extracted the old path for uploads folder.
The old path includes the user account on the server and when I migrated to the new server the username changed so for WordPress the file does not exist.
Looking for a good SEO plugin for WordPress?
Here’re the Best WordPress SEO Plugins (picked by an expert)
To solve this annoying error, you need to change the path of the old uploads folder to the new one. Follow these steps to solve the problem:
- Log in to your WordPress admin panel (wp-admin).
- In the left menu go to
Settings
»Media
. - In the Store uploads in this folder field, enter
wp-content/uploads
and click Save changes. - Now you are done, go and try to upload files to the media library again.
NOTE: make sure that the Store uploads in this folder field contains wp-content/uploads
only.
I can’t find the “Store uploads in this folder” field in my Media Settings page?
If you can’t find the field in your media settings page you can solve the problem by adding the following code in your wp-config.php file:
define( 'UPLOADS', 'wp-content/uploads' );
just above this line:
require_once(ABSPATH . 'wp-settings.php');
And the “Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server” error will be fixed.
Looking for good hosting?
Here’re The Best WordPress Hosting providers of this month
For LocalHost Installs (XAMPP)
If you’ve installed WordPress locally, and faces the error message and none of the above solutions fixed your problem.
You may need to reset the ownership of the installation to nobody by doing the following.
1. Run command line/terminal:
- On Mac:
Applications => Utilities => Terminal - On Windows:
Start => Programs => Accessories => Command Prompt
2. Run the following command
After replacing wordpress
with your actual WordPress installation directory.
sudo chown -R nobody:staff /applications/xampp/xamppfiles/htdocs/wordpress
Do you still get the “Unable to Create Directory wp-content/uploads…” error message?
If you couldn’t solve the problem and the “Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server” error message still appearing, let me know by adding a comment below and I will help you to fix the problem.
I have installed XAMPP on my mac desktop and then WordPress. Created a database and have wordpress running. but get error message: Installation failed: Could not create directory. /Applications/XAMPP/xamppfiles/htdocs/wordpresscopy/wp-content/upgrade/classic-editor.1.6.2.
seems like i’m getting closer as the error message seems to go deeper into my file system than earlier messages.
Here is my wp-config.php files:
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the installation.
* You don't have to use the web site, you can copy this file to "wp-config.php"
* and fill in the values.
*
* This file contains the following configurations:
*
* * Database settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://wordpress.org/support/article/editing-wp-config-php/
*
* @package WordPress
*
*/
/** Setup FTP Details **/
/*
define('FTP_HOST', 'localhost');
define('FTP_USER', 'daemon');
define('FTP_PASS', 'xampp');
define( ‘WP_CONTENT_DIR’, ‘/public_html/wp-content’);
*/
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wpdb' );
/** Database username */
define( 'DB_USER', 'jim' );
/** Database password */
define( 'DB_PASSWORD', '' );
/** Database hostname */
define( 'DB_HOST', 'localhost' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/**#@+
* Authentication unique keys and salts.
*
* Change these to different unique phrases! You can generate these using
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
*
* You can change these at any point in time to invalidate all existing cookies.
* This will force all users to have to log in again.
*
* @since 2.6.0
*/
define( 'AUTH_KEY', 'put your unique phrase here' );
define( 'SECURE_AUTH_KEY', 'put your unique phrase here' );
define( 'LOGGED_IN_KEY', 'put your unique phrase here' );
define( 'NONCE_KEY', 'put your unique phrase here' );
define( 'AUTH_SALT', 'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT', 'put your unique phrase here' );
define( 'NONCE_SALT', 'put your unique phrase here' );
/**#@-*/
/**
* WordPress database table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the documentation.
*
* @link https://wordpress.org/support/article/debugging-in-wordpress/
*/
define( 'WP_DEBUG', false );
/* Add any custom values between this line and the "stop editing" line. */
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
define( 'FS_METHOD', 'direct' );
/*define( 'UPLOADS', 'wp-content/uploads' );*/
It seems to me that you might be running out of disk space, or you don’t have the right file permissions.
Also, note that in your
wp-config.php
file, the last line/*define( 'UPLOADS', 'wp-content/uploads' );*/
is commented (disabled), you can uncomment it by replacing it withdefine( 'UPLOADS', 'wp-content/uploads' );
as mentioned above.Half a day lost and finally a solution. Thanks for the help.
Had to go to PHPMYadmin directly and go to wp_options, looked for upload_path and then change option_value to wp-content/uploads (rather…just assign it that value cuz it was just blank….still a little puzzled how that could be the case on a brand spanking new fresh install of WP using XAMPP on local Mac OS…). Also had to go to wp-content folder in Finder on Mac and literally make a folder called “uploads”, THEN had to give it Read/Write permissions for everybody. Now it’s FINALLY working. I can add images to WP and it saves them in uploads. Oh, but I’m STILL not getting the “Store Uploads in this folder” prompt under Settings/Media of WP. So I guess if I want to ever change that to a different folder I’ll have to just use PHPmyadmin. Seems like a lot of work to just make WP just allow me to add an image to a post and work the way it already should. Now I know why I just prefer html/css and square space. WP truly does suck.
Thanks! Your comment helped solve my problem!
Still no joy. Fresh install of WP on local Mac OS Ventura and just one problem after another. First it was MySQL wasn’t running, then .htaccess file didn’t have permissions, now it’s giving me this error of Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server in WordPress. And I can’t even get it to create the Store uploads in this folder in Media Settings Page. Tried everything. Tried reassigning to nobody. Didn’t work. So…I’m at a loss….
New to WP and honestly if it’s this bad from the very beginning of a new WP install, gotta say, feels like junk imo.
Thank you. You Saved me 🙂
This solution was exactly what I needed! Thank you so very much!
Good Job. I was assumed this was server issue, but you saved my time thanks.
Sincere thanks. I encountered this problem after moving hosting accounts. After a brief and fruitless ftp session, I found YOUR solution, and can confirm that it works perfectly straight after the first step !!!
BINGO. Thanks for the quick easy fix
I’m on a localhost installation. I tried what you said and got this:
chown: /applications/xampp/xamppfiles/htdocs/wordpress: No such file or directory
Replace the word
wordpress
in the command with your WordPress installation folder.For example, if WordPress is installed in a folder called
site
, the path should be:/applications/xampp/xamppfiles/htdocs/site
Great tip on the fix for not being able to upload images.
Awesome! Thank you, exactly what I needed
Thank you SO SO much for this fix! I tried a couple of other articles, but your info is the most up to date and it worked immediately while preserving the pathway to my other images. Thank you again.
Hi Mr. Ahmed,
I’m working on XAMPP localhost server, for re-designing our website by using OceanWp theme on WordPress.
when I have tried to upload the oceanwp.3.0.3.zip file, this error message has occurred for me:
“Unable to create directory wp-content/uploads/2021/08. Is its parent directory writable by the server?”.
After reading this article, I have tried all methods that have mentioned in it, but the problem is not fixed , and the message error is still appear, What you advise me to do now?
Do I download the above mentioned file using FileZilla or any other FTP software, and edit the file and upload it again to our website and replace the file on your website with the edited one, as you have advised one body here? or what?
thank you.
Hey Ayman,
Local server is known for causing problems like that since it is not as important or actively-developed as production environments (live servers).
My advice is to install another WordPress install in another folder and use it instead of the current one.
if that didn’t work, try reinstalling the local server itself.
P.S. you don’t need FTP software to work with local servers, you can use your OS’s file explorer.
Thank you very much for your replying,
I would apply your advise, but I want to inform you the following info:
I used MAMP as a localhost server before that and installing WordPress on it , and everything was OK.
Then, I have decided to change to XAMPP localhost server, thus, I removed MAMP, then I installed a fresh copy of WordPress again on XAMPP after installing it.
P.S. I’m using OS mac (High Sierra)
Hey Mr.Ahmed,
Now, the error message has been gone, but when I click on “install now” button, there is a dialog box appear for me titled with: connection information says:” To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host”, it requests to enter three information: Hostname – FTP Username – FTP Password.
Then there are two options: FTP & FTPS (SSL) to choose of them.
It appears that there’s a problem with file permissions as this error message appears when WordPress can’t write to the files in the WordPress tree.
Try adding the following line to
wp-config.php
file above the database configuration:define( ‘FS_METHOD’, ‘direct’ );
Hi guys,
I find another solution which by removing debug.log file inside wp-content folder
I find out that the log file was too big ,3Gb.
Thank you so much! I’ve had this problem and couldn’t find a solution that was straightforward and worked 🙂
Thanx a load this really worked for me, before permission this is the first thing we need to check and everyone ignored this.
WOW! This was the EASIEST solution. All these other threads were so useless and the problem was so simple to fix. Thank you!
so much thanks for helping me!
greetings from PL 🙂
Thanks for posting this.
I didn’t have the “Store uploads in this folder field” (step 3) inside the WP settings,
but I was able to add the “uploads” folder in the terminal.
This post definitely helped me get better at navigating Linux.
I appreciate the help.
– John
hello, I have a problem uploading my photo using the method above. I am using wordpress version 5.6.1
If you tried all the solutions above and none of them worked, you may need to reach out to your hosting provider.
Thank you! This worked!
So helpful! This worked for me. Thank you so much!!!
Thank you for this – Super easy instructions to fix my problem.
Thanks! You help me a lot!!!!
Thank you! I was having the exact issue and your solution worked perfectly.
Hi there,
I have wordpress installed locally and used:
sudo chown -R nobody:staff /Users/(my user name)/.bitnami/stackman/machines/xampp/volumes/root/htdocs/wordpress
Which is the path to the wordpress folder I’m using. I input my user password and then got a very long list of messages ending in “Operation not permitted”
I then tried just doing
sudo chown -R nobody:staff /applications/xampp/xamppfiles/htdocs/wordpress
just for the heck of it, but course that file directory doesn’t exist.
I’m really new to this and am just wondering what I’m doing wrong? Am I misunderstanding what the “WordPress installation directory” is?
Hi Kelly,
It appears to be user permission and your user account does not have sufficient permissions to change the folder permissions of Bitnami’s folders.
I’d recommend posting this issue on Bitnami Community forums or reinstalling WordPress in another folder.
hey kelly ,
iam in the same position – using localhost xampp on mac and stuck on same problem as you…. did you figured something out ? if yes plz share
I tried many option but still error is coming that ” unable to create directory, is it parent directory writable by server” . please help help me out
Hi Akanksha,
If none of the solutions above worked for you, try reaching out to your hosting provider.
If you’re using a local server, try reinstalling WordPress in a different folder.
Hey There,
Thank you a lot for your help. I had the same problem ” Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server” which I have solved going to media section.
This helped me 🙂
Thank you.
i still facing this eror in my mac please help me i try this command in terminal but in terminal also showing this err that no such file
Hey Harkesh,
Try the solution in comment #20042.
If it does not fix the problem, I’m afraid you might need a fresh WordPress installation.
Thanks for sharing,
Hey,
This was extremely thankful and worked for me. i was stuck for past 3 days and after checking this i got the solution. Thanks to you. You are a champ.
Thanks You Very Much sir, it is perfectly work for me.
THANK YOU!!!!!
Thanks so much for this, it was driving me nuts
Hey Ahmed,
I’m running a local install of WP on XAMPP, I design websites on a local environment. When I try uploading picture to the woocommerce store is when I receive the comment of Unable to create directory wp-content/uploads/2020/02. Is its parent directory writable by the server? I’ve completed all the steps above with no luck. Changed the file permissions as well as updated the wp-config.php file. I still don’t have an option to update file locations on the settings —> media area. I’ve been looking all over to fix this issue with no luck. Any suggestions would be greatly appreciated. Thank you.
Hey Carlos,
Try reinstalling WordPress and if it didn’t work, try reinstalling XAMPP itself.
Thank you. I’ll give those options a try.
Thanks Ahmed,
I figured out the issue. XAMPP uses daemon as user when using permissions on WP, when I change the user to PC user or nobody:staff to change config files XAMPP no longer had write permission. I turned write permission back to deamon and it worked. So if anyone uses XAMPP you must turn write permission back to deamon in order to use WP successfully.
Glad to hear that you could fix it and thanks for sharing that with us Carlos.
please try to erabrate how it works
yes, this worked for me
Oh.. Boy! You are really blessed! I nearly went really mad and then I saw your post. It worked very well for me. A million thanks! God Bless you and your family!
Best regards
Tissy Joseph
Thank you so much. It worked for me and helped me a lot
Thanks for this!
Hey Ahmed!
I’m unable to update my wordpress.
And the error is:
Downloading update from …
Unpacking the update…
Could not create directory.
Installation Failed
Please help me resolve this issue asap.
Hey Vishal,
It looks like there is a problem with file permissions.
Your Web Hosting provider should be able to fix it or try to update the file permission to 755 and let me know if it worked.
Thanks very much! Simple fix 🙂
Hi Ahmed,
I ran “sudo chown -R nobody:staff /applications/xampp/xamppfiles/htdocs/wordpress” (with my file name) in the Terminal but somehow it doesn’t detect the file. This is the error I get: “chown: /applications/xampp/xamppfiles/htdocs/innovation: No such file or directory”. What could be the problem?
Thank you in advance!
Hi Shweta,
It looks like you’ve installed WordPress in a different directory rather than
wordpress
.Change
wordpress
in/applications/xampp/xamppfiles/htdocs/wordpress
use the directory/folder where you installed WordPress and try again.Thank you, friend. This piece of information was a life saver. Cheers!
Hello Ahmed I have tried the “I can’t find the “Store uploads in this folder” field in my Media Settings page?” solution which is to edit the wp-config.php file. But after editing the file by inserting the 2 new lines of code. When i try to go the the website i get this error “Your wp-config.php file has an empty database perfix, which is not supported”.
I’m using my own linux server for hosting
I fixed it. I was trying to upload a picture and was getting this error. So i changed the owner of the folder “wp-content” and of “wp-content/uploads” to www-data and now i can upload pictures because it creates the new directories (dirs like 2019/04 etc).
Alright!!
Thanks so much, Ahmed! Easiest WordPress fix so far.
Hi Ahmed, I tried adding the code line to my php file, unfortunately I still get the error message. I hope you can help me fix this issue.
Hi Mathilde,
If you tried all of the above solutions and none of them worked, I’d recommend contacting your hosting support team as it might be something with server configurations.
Thank you so much Ahmed Elgameel sir, I have solved the issue easily with your suggestion, thank you so much again.
Hello Mate,
I would like to thank you for this information as below code help me to sort out the problem.
define( ‘UPLOADS’, ‘wp-content/uploads’ );
Thanks you very much!
Thanks so much for this missing piece of the puzzle! I did everything like you did with file permissions, etc. and even added the root directory + subfolder path to the wp-content/uploads, but nothing worked. I was doing too much!
wp-content/uploads was all I needed. Thanks so much for the “right” answer!
I am getting this problem and can’t solve it, please help. I only have FTP access, tried changing permissions from filezilla but it says “Command not understood”. Please Help!
Did you try the wp-config.php file’s method above?
yes i did, this is still what i get.
The uploaded file could not be moved to wp-content/uploads.
The problem may be with file permissions, try another FTP client rather than FileZilla or simply ask your hosting provider to change them for you.
Hey Akinniyi Ayodeji & Team,
Kindly edit the folder properties of the folder “uploads” by right-clicking on it and editing the security properties. Ensure that the user priviledges assigned to System user, Administrator user, Users, Trusted installer are all set to Full control. Click on Apply button and press Ok.
Trying process of uploading contents to your wordpress website again.
Bravo! Let me know if it works.
thank you so much. its work for me thank you
Hi there,
This has proved very useful but I’m still having the problem. I have WordPress installed locally and have tried each of your solutions to no avail. Any other thoughts?
Try changing the permissions of the folder, if it doesn’t solve the problem too try backing the files & Databases up and reinstall the local host.
I did try that, and also installed a fresh tester site this morning and still having the issue.
Then this might be caused by insufficient permissions or your anti-virus.
Try changing the permissions of the folders and disable your AV.
Thank you so much! You made my day 🙂
Glad to hear that!
mine too
I’ve tried everything. It wasn’t working.
But after creating subdirectory manually it worked for me.
This works for me after changing the permissions for the parent directory to read and write. I’ve been looking for a solution to this problem for the last half an hour and your blogpost really helped me out. Thanks a lot 🙂
Thanks! It worked 🙂
Hi Ahmed,
Thanks for all the effort you put into this, I am sure its greatly appreciated by everyone!
I am running a localhost with XAMPP on OSX. In the wordpress dashboard -> setting -> media the upload section doesn’t show.
– I changed the wp-config.php file according to how you described it in your post.
– I changed the permission of the XAMPP folders in my finder to ‘read and write’. (For user: ‘Maarten’) The other two ‘users/groups’ (authedusers + everyone) have the permission to only read it. I tried to change these to ‘read and write’ as well, but I wasn’t allowed to change this setting for these two. However, I don’t think this seems to be the problem.
Do you have any idea how to fix this problem?
Thanks in advance!
Maarten
Hi Maarten,
The following solution may help you.
1. Run the Terminal: Applications => Utilities => Terminal.
2. Run the following command after changing ‘wordpress’ to your WordPress installation directory:
sudo chown -R nobody:staff /applications/xampp/xamppfiles/htdocs/wordpress
Hi Ahmed Elgameel, i installed wp in my local machine and i getting the same error message and i also tried the terminal command and not fix my problem. i’m still getting the same error message.
Hi Jorge,
Check the permissions and it may also be caused by your antivirus.
If none of the solutions worked, try reinstalling WordPress or the Local server.
I have this issue, had upgraded to latest WordPress 4.9.1 without issue. But now I can NOT upload new media with the error given on this subject. I’ve tried setting permissions to 755, spent over an hour on the phone with GoDaddy with tier 2 support, still not resolved. Last month, before I upgraded WP to 4.9.1, it worked fine. But now it seems WP can’t create the directory for “12” month so it fails.
Also, I manually created the “12” directory with FTP, but when uploading now I get :
“2017 Fast Trax Holiday Special 1024.jpg” has failed to upload.
The uploaded file could not be moved to wp-content/uploads/2017/12.
After 4 phone calls, and talking with different levels of support at GoDaddy, it is now resolved. They said there were “permission issues” on my shared server space. Its now working normally.
It worked great 🙂 Thanks for sharing
Sir
I am using xampp control server 3.2.2 (apache & mysql) with WordPress 4.9.1 on windows 10 pro 64bit . I am trying to upload images or installing new themes but getting the following error:
The uploaded file could not be moved to wp-content/uploads/2017/12.
I already change the permission of folders to full control.
Please resolve my problem.
Have you tried the first solution by changing the uploads folder?!
Sir
The path is already created but it showing the following error
The uploaded file could not be moved to wp-content/uploads/2017/12
Following is the path for directory
C:\xampp\htdocs\WP\wp-content\uploads\2017
Try the last solution by adding the code to your wp-config.php file.
And if the problem persists, try to reinstall XAMPP again after taking a backup.
Thanks Sir Its Working For me, I am trying from three days but your post solve my problem, thank you very much
Hi Ahmed,I’ve tried all of the above and still coming up with the same error.
Hi Assia,
Have you tried to contact your hosting support? they may have done some changes to your account.
I made made these stuffs but it not worked, the problem here was the directory permissions.
Solution: change the wp-content.php permissions to be able to edit it. (You can do it just by going to the folder proprieties)
Hey Lucas,
Thanks for sharing your experience with us. Yet, you need to be careful while editing file permissions for security concerns.
I already tried all the method you mentioned in the article
but I still cannot upload any media on my wordpress?
Do you have any suggestions?
Try to contact your hosting provider, it might be a server-level issue.
Thanks so much! This worked like a charm!
thank You so much, Now i can Upload Media file Successfully,
Hi! I’m having the same error msg even after I made those changes to the wp-config.php. I’m using a localhost/ in MacOSX. How I can change the permissions to 777, I don’t know how to do that!? Thanks for your help man.
i have the same issue. using localhost on mac and there is no uploads folder in the wp-content folder.
Ahmed, you’re awesome! This was such an easy fix. Thank you so much!
Glad I could help!
Thanks for your comment.
Hi there Ahmed and thanks so much for what you do, helping everyone with their problems. I am running NGINX on Centos6 on VPS. I am getting this message, and nothing has worked to fix it. I searched WP for the string of the error message and it is printed from file “wp-admin/included/file.php”. I took out some “@” signs (error message suppression) to try to get some additional info. The resulting error message is:
Warning: move_uploaded_file(/var/www/mysite.com/html/script/wp-content/uploads/7.png): failed to open stream: Permission denied in /var/www/mysite.com/html/script/wp-admin/includes/file.php on line 376
Warning: move_uploaded_file(): Unable to move ‘/tmp/php3rLFVm’ to ‘/var/www/mysite.com/html/script/wp-content/uploads/7.png’ in /var/www/mysite.com/html/script/wp-admin/includes/file.php on line 376
“7.png” has failed to upload.
The uploaded file could not be moved to wp-content/uploads.
A quick check of folder “/tmp” shows no temp file there. The error is “failed to open stream”. It seems to the PHP upload to /tmp is failing. Maybe this has nothing to do at all with WP. I set the /tmp folder owner to same owner as NGINX and with read write permissions. Anything else you can think of that could help debug/fix this? Thanks again so much.
Hey Peter,
The problem seems to be with permissions, I suggest you call your hosting support and they should fix it.
All the best.
Hi there Me. Ahmed, and thanks for reply. I continued to debug this, and after temporarily chmod uploads folder to 777, I could upload and I noticed the owner of the uploaded file was “apache”! But I don’t have user “apache” on my system. Nginx and php-fpm are user “www-data”, no idea where user “apache” is coming from. But I chowned uploads folder to “apache” and it seems to work now with folder permissions set back to 755. Thanks again for your helpful blog!
Thanks for your comment, as I said it is with permissions.
Glad I could help.
Thanks so much. Your solution worked a treat. Even though I followed the instructions I was still expecting to have to spend a lot of time tweaking to make things work for me. But not at all. Problem solved in less than five minutes. Thanks so much
Glad it helped.
Thanks Ahmed – God bless u ..
Thanks for your comment Jack.
Hi,
I have no “Store uploads in this folder” field in my Media Settings page,
So I used the code
define( ‘UPLOADS’, ‘wp-content/uploads’ ); before the line of
require_once(ABSPATH . ‘wp-settings.php’); on config.php
But still no “Store uploads in this folder” in my Media Settings page.any suggestions?
This should solve the problem, not for showing the “Store uploads in this folder” in media settings page.
Try to upload files again.
I was try your all recomendation. But not works. Any solutions?
Contact your hosting provider.
Hi,
I’ve tried all of the above and still coming up with the same error.
Thanks
Contact your host, the problem may be at their end.
You have no clue how many hours I spent trying to fix this issue. Thanks for your post, you just saved my brain of going crazy.
Thank You so much. This solved my problem after moving my site to a new server. It is all so complicated and looked for several day before I found your solution. Thanks again for taking time to provide help.
hello. i am using local host server and getting error
Unable to create directory wp-content/uploads/2017/05. Is its parent directory writable by the server? i tried both above solutions and still getting the error..any suggestions?
I met the same problem as you.
New installation on AWS with NGINX
Using ‘define( ‘UPLOADS’, ‘wp-content/uploads’ );’ just renders my website dead
Only way was to give the folder 777 even 775 won’t work. Is there a way to just give 777 permission to NGINX or a particular user in this case?
Cannot leave it to 777 for reasons you’ve already touched upon
Hello Ahmed,
I am completely new to WordPress, and I receive the following error message “Unable to moved to wp-content/uploads/2017/02” while trying to upload any kind of files. Could you please help me with this? Looking forward to your reply.
Thanks.
Hi Athria,
If you tried all the solutions above and you still can’t upload files to WordPress. I suggest that you contact your hosting support team, and ask them to fix the issue.
please sir, i have added define( ‘UPLOADS’, ‘wp-content/uploads’ ); to the wp-config.php file but that did not work, so how do i set the file permission to 775??
I don’t recommend changing file permissions (for Security). Yet, you can change them using FTP program like FileZilla. Then connect to your FTP server using FileZilla, right click on the file / folder you want » choose File permissions… » and write the new permission in the Numeric value field and click OK.
I have put that line as you said but it did not work. It can’t be hosting problem because i have other wordpress websites and they are working fine. So now how to resolve it?
In this case you can contact your hosting company as the problem might be with file permissions and I don’t recommend changing them by yourself for security.
Hey, I’m a complete newbie at building websites, everytime i paste the code into the .php in dreamweaver and save i still don’t get the store uploads option.
I might be being really stupid here but like I said i’m a complete newbie at this.
Any help?
Thanks!
Hi Andrew,
You need to add the code to the “wp-config.php” file on your website. So download that file using FileZilla or any other FTP software, edit the file and upload it again to your website and replace the file on your website with the edited one.
If this didn’t fix the problem, I’d recommend contacting your host to fix it as the issue might be with file permissions and changing them may affect your website’s security.
All the best.
I have this problem with uploads, I receive the error
“Unable to create directory wp-content/uploads/2017/03. Is its parent directory writable by the server?”
I followed your post and did all that was recommended but still issue was not resolved. I don’t have the text box “store uploads in this folder”
If you don’t see the field “store uploads in this folder”, follow the guidelines above and add the code to your wp-config.php file and if this didn’t solve the problem, you may need to contact your hosting provider.
Thanks for stopping by!
I dont have a domain yet so I am using localhost but I still have the same problem evebafter making changes on the config file. On the setting -> media the upload section still doesn’t show. Is there another solution?
Hi Sibabale,
File permissions may be the cause of the problem.
can you please send steps towards changing permission and not compromise on security.
Since you’re using a local host, take a look at this comment and this one too.
Thanks Ahmed all is well now.
Glad to hear that.
Thank you so much for your help. Problem occurred after migrating to another hosting company. Your fix worked like a dream.
I’m glad to hear that.
Thanks for your comment.
Hello,
I get the same error.And I found out that my wp-content folder does not contain any uploads folder.So possibly it seems as if I have permissions problem.Please suggest.
Hey Nandini,
Try the solution above, and if it didn’t work, you may need to contact your hosting provider.
Thanks.
Hello, I did all the changes you mentioned but still the same. Also there is no Upload section under Settings > Media.
I tried to create it manually through wp-config but no luck, WP Version 4.6.0; Code snippet is as follows –
/** Absolute path to the WordPress directory. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . ‘wp-settings.php’);
define( ‘UPLOADS’, ‘wp-content/uploads’ );
// Setting up Upload Path 9.02.2017
Host is on Godaddy, Windows
Try to check folder permissions and I think you need to contact your host support team.
Change Uploads Folder permissions to 777 and you are done. Thanks!
Thanks fr your comment and glad you could fix it. But you need to consider the security issues with 777 file permission.
Ahmed Elgameel,
Thanks so much. Finally i fixed it my issue.
Glad I could help.
THIS DID IT!!!!!! After hours on Youtube videos this actually did it! Thanks!!!
Glad to hear that.
Thanks for stopping by!
sir. i can’t fix it still error, please help me T-T
Please, provide more info.
when i will change permission 777 or 755 then ok botton
have popup -> transfer log -No errors found.
so can’t change sir.
thank you
Did you try all other ways instead of changing permissions?
yes sir,
1.in my menu setting -> media-> not have( Store uploads in this folder)
2. in “wp-config.php” too’.
T-T
Well, I believe you need to contact your hosting provider and ask them about the problem they might have changed something with your account.
thank you sir. i will contact.
@^-^@ thank you for your help sir.
I hope they can fix the problem
Thanks for your comment.
Thanks man it solved my problem. It too happened when I migrated my site from godaddy to siteground.
Glad it helped you.
hlo sir please help i still have this error [Unable to create directory wp-content/uploads/2016/12. Is its parent directory writable by the server?] please solve thanks.
Hey Amanpreet,
Please provide more info on the error, also take a look at comments below as I think you’ll find a way to fix the error.
Thanks!
Just tried to make some design changes and ran into the same problem. I followed the steps did everything but then I got a new error saying “The uploaded file could not be moved to wp-content/uploads/2016/12.”
Please Advice
Thank you
The reason for this problem may be one of these:
NOTE: DO NOT set it to 777.
Also I suggest that you contact your hosting provider to fix this issue.
Thanks for your comment.
Thank you. I would give it a go and see what happens
Thank you Ahmed for giving so much of your time to help others. I too have had hours of grief using WordPress for the first time (15 years out our IT). 4.7 is the version I loaded onto the server (hosted by zanyspace.com) as a .tar.gz. through the webshell, then decomp into a folder off the root (‘/wordpress’) went through the process of adding in details – server, dbase, UN&PW etc and it installed no prob and I’m signed it :-). However as I start designing, I too found I could not upload any pics and got the same error relating to this blog.
Permission were then set 777 recursively from ‘/wordpress’ [parent folder] off the root, still no luck, so set them back to 775.
I followed the instructions to modify wp-config.php, again with no luck. I then recursively changed permissions to 777 again and voila we have communication!! I can not leave the permissions openly set like this as you would appreciate. Do you have a way the server will see WordPress as either ‘Owner’ or ‘Group’ instead of ‘Other’?
The config on the server seems to have all the correct settings (+ your mod through Textpad).
I have even added an ftp sub-account in the cPannel with the same UN&PW as the mySQL db thinkging it my be a ftp issue but no luck there. The only way for WordPress to allow uploads is with 777 or 007 set from /wp-content on wards and I can’t leave it like this, it’s vulnerable.
Thanks for your comment Andrew,
I think you need to contact your hosting support team to fix this problem.
They should figure out where the problem is and set the correct permissions.
If you need any further assistance, don’t hesitate to drop me a line here!
Thanks it worked .
Glad it could help you.
Thank you so much dear. You saved time
Thanks for stopping by.
Hi, I just connect My web host to WP but Im having this problem too, I did the things you mentioned but nothings shio up in setting/media , could you please help me out ?
Have you tried the second solution and added the codes to your “wp-config.php” file manually?
You can also try to change permissions of “wp-content” folder to 755.
i TRIED BOTH THE THINGS. STILL NO SOLUTION.
Hey Aditya,
Please provide more info on what exactly the error you get so that I can help you more.
Thank YOU! Saved the day on our website.
Glad to hear that!
Thanks for the detailed answer!! Was of great help on fixing this issue 🙂 Regards,
Glad to hear that.
THANK YOU!!!
Thanks for your comment.
Hi, i’ve tried everything you said, and it still doesn’t work.
I can’t see the folder in Settings > Media, even after adding the line to the wp_config.
I’ve tried the 777 method, but that also didn’t work.
Are you using a Localhost or an online host?
If it still not working after changing permissions to 777, change the permissions for the “wp-content/uploads” directory too to 755 or 777.
The cause may also be running PHP in “Safe Mode”. If so, contact your hosting provider to change the owner of scripts and upload directories to belong to your account or ask him to disable Safe Mode.
And let me know if it still not working.
Thanks for your response!
I’m using a online host (a server from my school)
The map “wp-content/uploads” does not exist in my FTP server. I’ve tried creating it manually, but then wordpress returns this error : ‘The uploaded file could not be moved to wp-content/uploads/2016/10.’
Also, letting wordpress install a theme on my site doesn’t work, i keep getting an error, even though i know for sure the information is correct. : http://imgur.com/a/EadwE
As for the PHP safe mode, i’m not sure how i can check that? I can’t contact teachers at this time since it’s vacation.
The problem is with your FTP account, From the screenshot you can easily understand that WordPress can’t connect to the FTP server, so it can’t create any new Directory or file or edit any old one.
I think you need to contact your teachers or your school’s system administrator and ask him to solve the problem with the FTP server.
Hello Ahmed, I am using a Localhost on xampp on a mac. I tried to do exactly what you wrote, but when i edit the wp-config file i get another error:
Parse error: syntax error, unexpected ‘require_once’ (T_REQUIRE_ONCE) in /Applications/XAMPP/xamppfiles/htdocs/nish/wp-config.php on line 91
Kindly assist.
Regards.
Hey Reagen!
The error that you get is mainly because you didn’t edit the wp-config.php file correctly, so try to fix this issue or paste the content of the file and I’ll don my best to solve this issue.
For the “Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server” error, I think you need to provide more information about what exactly you did? as I mentioned many ways in the article and in comments. For now, you can try checking your Mac user account permissions, as sometimes your account don’t have permissions to edit some folders and those folder may include the Xampp folders.
So either change permissions to 755 or 777 or give your user account full control over the folder.
Thanks so much for this article! It was very helpful!
Thanks for stopping by.
MR. Elgameel,
I am also having this problem. When I try and upload a theme I get the following error:
The uploaded file could not be moved to wp-content/uploads
When I try to upload a picture to post in a blog entry I receive the same error.
I have added the code:
/**added as per wp-me .com suggestion*/
define(‘UPLOADS’, ‘wp-content/uploads’ );
to my wp-config file.
I have permissions setting of 755 on folder “uploads” and it is owned by nobody,nogroups.
I have unchecked the box asking if i want to keep it in a month and day folder.
I have bounced apache and I am at a loss. I have several plugins and a theme to install before going live with this thing.
Can you be of assistance sir?
Kind Regards,
Brad Hamilton
First of all, check the box that asks you to keep it in month and day folder.
Also have you added the code before the other line I mentioned?
Are you using a localhost? or a web hosting account?
waiting to hear from you, and if I couldn’t help you here I can connect with you on Facebook for further assistance!
Thanks for your comment.
I was looking for this because I have this issue as well. But when I checked the Media Settings I have thumbnail sizes and Organize my uploads into month- and year-based folders. > “Store uploads in this folder field enter: wp-content/uploads and click Save changes” isn’t there. No place to add it. I have no way to fix it going about the using this simple answer. I am not sure about the other options I see in comments about other ways to work around this.
Hey Kim,
If you don’t find the field you can add the following code in your “wp-config.php” file:
[php]define( ‘UPLOADS’, ‘wp-content/uploads’ );[/php]
but, make sure to add the code before this line:
[php] require_once(ABSPATH . ‘wp-settings.php’);[/php]
And it should work.
I have no clue where that file would be. In the theme or where? I can’t find it. I check in Editor of the theme and it’s not there. I Google it and found this https://codex.wordpress.org/Editing_wp-config.php Which isn’t helpful, just told me where you find the file. 🙁
If its in WordPress itself and my issue is in a blog , what can be done? 🙁 I have 2 blogs that have this issue.
The file is in the main directory of WordPress.
See this: https://imgur.com/EaEwnB7
Just open it with any text editor like Notepad or Notepad++ (Preferred) then click CTRL+F and search for this line:
[php] require_once(ABSPATH . ‘wp-settings.php’);[/php]
and add this code before it:
[php]define( ‘UPLOADS’, ‘wp-content/uploads’ );[/php]
If you couldn’t do this, send your wp-config.php file to me and I’ll edit it for you.
But It contains sensitive data like you WordPress database username and password.
Thanks!
I have did as this is but i found again error message like “The uploaded file could not be moved to wp-contentuploads.” please solve the problem. I am working on my website on local serve with xammp
Its “wp-content/uploads” not “wp-contentuploads”.
i dont have Store uploads in this folder in my media settings?
If you don’t have the option to change the uploads folder in your media settings page, you’ll need to change it manually.
Open your “wp-config.php” file with any code editor and add this code to it:
[php]define( ‘UPLOADS’, ‘wp-content/’.’uploads’ );[/php]
I did exactly the code.
but still it’s showing the error!!
Delete the previous code, and use this code:
define( 'UPLOADS', 'wp-content/uploads' );
and make sure to add it above this line:
require_once(ABSPATH . 'wp-settings.php');
IT WORKEDDD!! 🙂
Added the ‘require_once……’ and ‘defin (..);’ but it still didn’t work.
Then changed the permission of [wp-content to 777] and it worked.
Thank you very much, this is my first web site usinf wordpress plus using LAMP stack.
You rock…XD
Glad I could help you.
If you have any problem don’t hesitate to contact us!
Hello Ragnorok, Am facing the same problem i want to know how u changed the permission of wp-content to 777 because my wp-content folder contains 2 folders(plugin folder and theme folder) and index.php but index.php has no code in it.
I have tried all d other answers as sugested by Ahmed but i still get the same error.
Hi gsp,
To change the folder permissions,
1. connect to your website FTP server using FileZilla or any other FTP software.
2. Select the file or folder you want and right-click on it, then click on “File permissions” and enter the permission you want and right click on the folder click OK.
That’s all!
thank u Ahmed for the quick response,
For my case i installed wordpress on local site (using Xammp).but i get this error whenever install a theme or an media image
(Unable to create directory wp-content/uploads/2016/09. Is its parent directory writable by the server?)
Try this,
In your Windows Explorer, go to the folder you want and right-click it, then go to “Properties” » then go to “Security” tap, and change the permissions for the current user to “Full control”.
Let me know if it worked!
thank you Ahamed, i fix it by Right clicking on all the folders and changing the sharing and permission settings to “write and Read”
Glad to hear that.
Enabling FastCGI worked for me. If you’ve tried everything else and nothing works then the problem may be due to WordPress (or similar) itself (ie. the User rather than the target folder) not having access rights. FastCGI (or similar) bridges the gap. Ref: https://docs.plesk.com/en-US/12.5/administrator-guide/web-hosting/php-management/php-handler-types.75145/
It Works for me after changing the Permission of wp-content to 777 thank you Ahmed Elgameel & Ragnorok
Glad to hear that!
Thanks for your comment Juneed.
my exact error is
Unable to create directory wp-content//2016/09. Is its parent directory writable by the server?
but still i have ‘uploads Dir’.
The problem appears to be with the two // in the path “wp-content//2016/09”. Is this error before or after adding the code I gave you?
Hi,
Thanks for sharing the solution, I have fixed my uploading issue with the help of your suggestion.
Simple and very helpful.. thank’s
Glad I could help you!
Hi Ahmed, I read with attention this whole discussion but couldn’t find the answer to my problem I am working on my localhost… and I can’t change the permission… it doesn’t appear when I right click on it… any other ways to do it ? Thanks a lot.
Hi Benjamin and sorry for the late reply,
You can change permissions on localserver by going to the folder you want » Right click on it » Properties » Security » and change the permissions for the current user to “Full control”.