Any ideas on this? I earlier got an error on some update directory, and manually deleted it (unfortunately I didn't write it down). I think I've done auto-upgrades on the same domain before.

Downloading update from http://wordpress.org/wordpress-3.1.3.zip…

Unpacking the update…

Warning: copy(/home/nwalters/public_html/wp-admin/includes/update-core.php) [function.copy]: failed to open stream: Permission denied in /home/myname/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 200

Could not copy files.

Installation Failed

3 Answers 3


sounds like you need to think about a new host... do I dare ask where you're hosted now? But yes that's a permission issue.

  • might i suggest rackspace cloud servers as a new host. you setup the server and all the modules you want and your in control with full root. They manage the hardware and the best part is it starting costs is about $12.00 May 27, 2011 at 5:32
  • Perhaps the smarter solution is to work with my existing hosting company. No reason to switch. May 28, 2011 at 1:18
  • Now the hosting company is giving me excuses, so perhaps you were right. Jun 2, 2011 at 12:56


The simple fix is to change the user and group ownership of the files making them the same that PHP runs under. With shared hosting (100's of accounts on the same server) a special mod is used to allow PHP to run as your user account. Most likely this is your situation. There are 2 simple fixes for this.

  1. Add the following to your wp-config.php:

    define('FS_CHMOD_DIR', (0755 & ~ umask()));
    define('FS_CHMOD_FILE', (0644 & ~ umask()));

    This will allow WordPress to override your hosts wrong permissions settings.

  2. If this doesn't work you can force WordPress to use FTP to do the upgrade by defining your ftp credentials in wp-config.php

Add these lines to wp-config.php using your information:

define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/path/to/wordpress/');
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
//define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');
//define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'ftp.example.org');
define('FTP_SSL', false);

The 2 commented out lines would be used if you access your webhost with SSH and have an SSH private / public key pair.

If your on a private server or VPS PHP will most likely be running as either www-data or nobody. To fix this you would just run chown www-data:www-data /home/nwalters/public_html/ -R from the command line to repair the ownership.

Hope this helps.

  • now that is new. i have not seen the define chmod commands May 27, 2011 at 5:36
  • Thanks, I tried both tricks above (nice to know!). But I think I'm blowing up when it is unpacking the zip it download to my site; in other words, I think the download worked, but the unzip didn't. Maybe this is something I need to get hosting company to fix. (It is shared hosting... I was thinking maybe some chmod commands using FTP might fix it). May 28, 2011 at 1:18
  • Yes your host company support staff should fix this for you.
    – Chris_O
    May 28, 2011 at 17:34

It looks like you don't have permission. I would recommend doing a manual upgrade. Its a lot safer and you can always find the problem quicker. check out this link http://wpmu.org/oops-i-broke-wordpress-how-to-fix-your-auto-update-problems/

  • I've done a lot of manual upgrades before, it's just SO much slower, having to wait for the FTP from PC to Server. Was hoping that since my upgrades used to work, there was a simple security fix, maybe setting attributes on some folders. May 27, 2011 at 4:38
  • use ssh instead unless you dont have that. I always use ssh. i make a backup of both wordpress folder and database then just ssh the new version and move everything over simple quick and painless May 27, 2011 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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