WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to upgrade to WP 3 but I'm getting a weird error when I try to do so:

Downloading update from http://wordpress.org/wordpress-3.0.4.zip.

Unpacking the update.

Could not create directory: /my/path/web/wp-content/upgrade/wordpress-3.tmp

Installation Failed

The reason it's weird is because the upgrade directory has 777 permissions. I ran chmod -R 777 upgrade/ and when I do an ls, I see that upgrade is world-writable. I'm sure I'm dealing with the right directory because if I delete upgrade, I get a different error.

Any idea why this happening?

share|improve this question
is php safe_mode activated? – Cronco Jan 27 '11 at 4:16

You need to run the chown command on whole wp-content directory:

chown www-data:www-data /path/to/wp-content/ -R

share|improve this answer
This worked for me. – Zabba Jul 12 '11 at 6:26
depending on server, user/group might be nobody instead of www-data – yitwail Feb 25 '13 at 23:39
up vote 2 down vote accepted

The fix turned out to be to change vsftp's permissions in the vsftp config file.

share|improve this answer
Then mark your answer as The Answer. – toscho Jan 20 '12 at 17:44
There's a delay before they let you do that, buddy. – Jason Swett Jan 20 '12 at 18:46
Could you be more specific about the changes to vsftpd.conf? – iyrin Jan 7 '14 at 20:07

Cannot creating directories even through a 777 CHMOD imply that your FTP local users does basicaly not have the permission to write files on your machine, to fix that try to edit your vsftpd.conf file and check that write_enable is equal to YES

Edit vsftp.conf file

sudo vim /etc/vsftpd.conf

then uncomment the existing line (or set it's value to YES)

share|improve this answer
Please explain why this edit will help the Question. A code-only answer is a worst one. – Mayeenul Islam Jul 16 '14 at 4:08
@MayeenulIslam , answer edited – BenjellounAyoub Jul 17 '14 at 23:39

What account is the directory owned by? Try CHOWNing the directory to the account your web server runs as (probably "apache").

This generally looks like:

chown apache:apache your/path/to/upgrade

But YYMV depending on your server setup.

For some reason (I'm not a skilled server admin), ownership of the directory can cause permissions issues, even if your permissions are set to 777.

share|improve this answer
It's owned by user jason. I already tried chowning my dir to www-data (my Apache user) but it still didn't work. – Jason Swett Jan 26 '11 at 22:09
@Jason Swett Hmm... did you also change the group when chowning? The upgrader (eventually) just uses mkdir to create the directory, so you could test any changes you make to permissions/groups by making a simple script that runs a mkdir command, and hit it with your browser until it works. – MathSmath Jan 26 '11 at 22:31

This might be an issue with php's safe_mode. It has made my life hell when dealing with uploads in automatically generated folders, and I suspect this may be the case here.

If it is activated, please enter your cpanel, plesk panel, contact your sys admin, try to deactivate it and try again.

share|improve this answer
Thank you. After wasting a lot of time I found your comment. In plesk panel for a domain there was a setting to deactivate safe_mode (It could also be done via php.ini). – tavi May 5 '14 at 9:00

While trying to upgrade WordPress, I was getting the error “Could not create directory”. I searched for solutions and found several other recommendations I’ll share with you, and then what finally worked for me.

The first is to go to wp-content -> upgrades folder, remove it, and then recreate it and chmod 777 (you may also want to chmod 777 the entire /wp-content folder). After installation is done chmod back to 755.

The second is to disable all plugins, or at least all the security plugins.

The third is to do a manual installation.

Since this was the first time I’d gotten a failure-to-upgrade error, I decided to try disabling just my most recently-installed security plugin which is called AskApache (I didn’t change any permissions). The upgrade then went through without any problems.

share|improve this answer

Who is your webhost? Ownership of new directories can be problem with some (cheap) host(s) and you won't be able to change it without their help.

And don't leave any directories at 777. WP needs a maximum of 755.

share|improve this answer

I had the same problem, and found out / fixed it:

  1. The user who cannot create the directory is the ftp user you use for upload. In an save environment you can enable root user to log in via ftp. But - be sure to disable the root user for ftp afterwards. Do not forget it.

  2. In my installation (ubuntu 16.04) I had two wp-content/plugins directories - don't ask me why. usr/share/wordpress/wp-content/plugins and var/lib/wordpress/wp-content/plugins . Make sure both directories are writeable by the ftp user.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.