Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

6 Answers

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
add comment

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
add comment

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
add comment

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
add comment
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
1  
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? –  RyanLoremIpsum Jan 7 at 20:07
add comment

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
add comment

Your Answer

 
discard

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.