Can't auto update WP, themes, Plugins etc. Help?

Hey folks, I seem to have some issues updating WP, plugins and themes.

I have a number of different WP websites all running on a virtual server which is in turn running Linux + Plesk. Some sites are on their own individual webspace ( and some are hosted in subfolders of webspaces but madeto show that website’s name in the address bar (ie =

I get this error on ALL WP installs for both plugins and themes, so I can’t auto upgrade any plugins serverwide :slight_frown:

Unpacking the update…

Installing the latest version…

Removing the old version of the plugin…

Could not remove the old plugin.

Plugin update failed.

Strangely though, some installs of WP itself will automatically upgrade without problem but one fails every time. I can’t find any pattern to the ones that work and the one that doesn’t.

Downloading update from…

Unpacking the update…

Could not copy files.

Installation Failed

Then here’s the strangest bit, I have a couple of old blank installs of WP that I planned to develop into sites but never got the time to even start on, I just reloaded them up after all this tiem tried upgrading those installs (from .2 to .3) aswell as the akismet plugin included, both upgraded fine with no issue?!?! And these 2 blank sites are in subfolders just like the site that won’t update wordpress ie (WP won’t update) (blank WP, everything updated fine) (blank WP, everything updated fine)

Could you please help me to figure out why:

a) That one copy of wordpress keeps failing to update

b) Why no plugins on any sites server wide (apart from the blank WP installs) will update

Thanks very much for your time,


  • aecnu
    • WP Unicorn

    Greetings Dave,

    This sounds like a permissions problem to me and possibly a mod_security problem.

    Though you did not mentione the WordPress version and all the other stuff we like to knwo about a site before we dig in, lets partially dig in by starting with the htaccess file and adding a mod_security disable statement and see if that cures the problem.

    Place this line as the very first line in the sites htaccess file:

    SecFilterEngine Off

    Please advise if that does the trick.

    Thank you for being a WPMU Dev Member!

    Cheers, Joe

  • davejmason
    • Site Builder, Child of Zeus

    Hi Joe, thanks for the message,

    I just tried adding SecFilterEngine Off into my .htaccess and it caused an internal server error. Upon removing it again everything is back to how it was.

    All WordPress installs are up to the latest version apart from the one that won’t upgrade to 3.3.2 which is stuck at 3.3.1

  • aecnu
    • WP Unicorn

    Greetings Dave,

    Is this a linux server that you are dealing with? Not Windows?

    Now you got me worried about your install. The fact that coding caused an error means there is something big going on if it is a linux host and you would certainly want to contact them and tell them what is going on. If it is a Windows host then you are in for none stop problems anyway.

    Please advise.

    Cheers, Joe

  • davejmason
    • Site Builder, Child of Zeus

    Yep it’s a Linux host. Technically I am the host, I rent the server from Fasthosts and they installed Plesk for me but from that point on, everything is my responsibility. I’m really not sure what I could’ve done to cause this. Do you think the problem lies within linux/the server itself or Plesk?

  • aecnu
    • WP Unicorn

    Greetings davejmason,

    Well as you can see I am well qualified to answer this question , it has been my profession since 1998, but I do not know why this is happening.

    But on linux, perhaps CentOS? This is not good news the trouble you are having and could be something as simple as a permissions problem all the way to a security breach.

    So lets see what we can figure out.

    First thing I would do is FTP into the site and check the dates on the files and see if they all match or all dated before the last time you messed with them.

    After this is to check the ownership.

    Did you FTP this site up or use SSH to send the site up?

    FTP clients like Core FTP will tell you whom the owner of the files are.

    Also check permissions while you are in there. i.e. wp-content 755 etc.

    I have dealt with three major CPanels, being Cpanel, DSM by zervex, and Ensim and have never known a CPanel to do this.

    Please advise to the above as we try to figure out what is going on there.

    Cheers, Joe

  • James Dunn
    • The Crimson Coder

    Hey DaveJMason.

    I was a Fasthosts customer on their Reseller Program for about three years. When I outgrew that (meaning I needed more access to server functions and ability to run scripts), I graduated to their dedicated server and like you had a bare server. Glad they installed Plesk for you – they wouldn’t do it for me unless I paid them a huge chunk of change. Plus, they wanted a nice chunk of change everytime I called in for help – even if it was their problem. I finally moved away from them to a REAL HOST.

    Regardless, like Joe said, my first suspicion is that this is a permissions/ownership issue. I’ve seen more of these recently and I can’t seem to figure out if it’s a WP issue, hosting issue, or some of the security protocol changes that I’ve made. Plus, I’m seeing it more with other people as well and they are not hardening their security like I am, so I’m a bit puzzled.

    Like Joe said, CoreFTP will tell you not just the permissions (like FileZilla will), but will reveal the owner of files and folders. This is extremely valuable information when troubleshooting a problem like this. When I was using Plesk with Fasthosts, I never had this type of problem (don’t get me started on CPanel or that will be a thesis that I write). Be sure to post back here once you get it all sorted because I want to know. As many times as I get called on issues, knowing these types of things really helps me help my clients better. When they are on other hosting, it really helps me do my job better.

    James Dunn

    Athens, GA USA

  • davejmason
    • Site Builder, Child of Zeus

    I’m not sure what CentOS is? I guess it’s the Linux equivalent of Windows? I looked up the server info and it’s os_Ubuntu 10.04 Linux 2.6.38-11-server.

    If it’s of any use, this has been going on for a LONG time and it’s just gotten to the point where everything is so out of date it’s silly. So I looked into things a bit more and discovered that when I install a plugin via wordpress the server assigns the permissions to “www-data” and denies me all access to editing, moving, renaming or deleting”. Whereas when I upload the files myself via FTP they are assigned the correct permissions (me).

    There are so many files I can’t even bare to think, it would take days surely to examine the date of every file? Plus I’ve uploaded plugins, changed the .htaccess files, edited configs and all sorts across all sites since installation.

    I used the Plesk automatic app installer to install every copy of WordPress so far, perhaps this could be related? All the editing has been done via FTP. The only permissions I can see are for:


    psacln [group]

    psaserv [group]

    My own ftp

    www-data (any files belonging to this I can’t delete or change the permissions for)

    Basically, it seems like anything WordPress writes to the server sets the owner as www-data rendering me unable to edit it. Maybe this has something to do with plugins not updating?

  • davejmason
    • Site Builder, Child of Zeus

    So could it be simply that WordPress is installed on an ftp user that I can’t access: This strange www-data demon…? If so how do I stop it and change it over to my main ftp account?

    Computers eh. Oh how you seek to make my life so difficult!

  • James Dunn
    • The Crimson Coder

    O.K. @davejmason.

    I’ve been doing some digging (a friend in Germany calls me a Terrier because I grab ahold of something like this and will not let go. Apparently this is not an uncommon issue and deals with ownership (as we were originally discussing). The www-data is your APACHE owner notation and apparently WP uses this owner for a lot of it’s “activities”. However, anything you do through FTP is actually assigned to the FTP user NOT the APACHE user.

    In one of the forums I was in, someone suggested adding APACHE to the FTPGROUP, but that will not work.

    Try this:

    gpasswd -a ftpuser www-data (this adds ftpuser to www-data group)

    chown www-data:ftpgroup -R your-directory (this gives owner to www-data with ftpgroup)

    Apparently one of the two is making a mistake when it writes a file, in the way that it is not allowing “writes” on the group, This change makes it where both can share the same write permission without colliding each other.

    Give it a shot – or wait for Joe to comment. I’m an OLD “server head”, but I’ve not worked at the server level for many years until just the past year or two, so I’m having to remember and relearn alot of what used to just come naturally. I am definitely prone to error here, but give this a shot and let me know what you find.

    BTW, this is similar to what I had to do when I was having a similar issue. We had to CHOWN an errant directory giving it the proper owner and group. I wrote down the specific order so I would not forget it in the future.

    Take care and have a great weekend.

  • aecnu
    • WP Unicorn

    Greetings davejmason and JDD,

    @davejmason did JD’s suggestions get you anywhere?

    @jd thank you for the great advice and following up.

    If things get hairy with the hosting and you cannot get it fixed, check out

    But until that time we will do whatever we can to get this handled with what we currently have.

    Please advise on your current situation with your current server.

    Thank you both for being WPMU Dev Members!

    Cheers, Joe

  • davejmason
    • Site Builder, Child of Zeus

    Bam! It’s fixed.

    I commented out this in the wp config:

    /**define (‘FS_METHOD’, ‘direct’:wink:; */

    And replaced it with this:

    define(‘FS_METHOD’, ‘ftpsockets’:wink:;

    define(‘FTP_BASE’, ‘/httpdocs/yourwpfolder’:wink:;

    define(‘FTP_CONTENT_DIR’, ‘/httpdocs/yourywpfolder/wp-content/’:wink:;

    define(‘FTP_PLUGIN_DIR ‘, ‘/httpdocs/yourwpfolder/wp-content/plugins/’:wink:;

    define(‘FTP_USER’, ‘my-ftp-username’:wink:;

    define(‘FTP_PASS’, ‘my-ftp-password’:wink:;

    define(‘FTP_HOST’, ‘’:wink:;

    Then I logged into the linux root account via SSH and used the following commands from within the wordpress root folder to change the ownership from www-data to my own ftpuser:

    chown my-ftp-user wp-content/upgrade -R

    chgrp psacln wp-content/upgrade -R

    chown my-ftp-user wp-content/uploads -R

    chgrp psacln wp-content/uploads -R

    I have no idea what psacln is but all the other files seem to be in that group so I set it to that.

    What is the FS_METHOD and how will changing it to ftpsockets affect me?

  • PC
    • WPMU DEV Initiate

    Hello Dave,

    It seems that the issue got sorted out but you still had a question !

    What is the FS_METHOD and how will changing it to ftpsockets affect me?

    FS_METHOD forces the filesystem method as the name suggests

    Values : should only be “direct”, “ssh2”, “ftpext”, or “ftpsockets”

    You should only change this if you are experiencing update problems, If you change it, and it doesnt help change it back/remove it,

    Under most circumstances, setting it to ‘ftpsockets’ will work if the automatically chosen method does not.

    (Primary Preference) “direct” forces it to use Direct File I/O requests from within PHP, this is fraught with opening up security issues on poorly configured hosts, This is chosen automatically when appropriate.

    (Secondary Preference) “ssh2” is to force the usage of the SSH PHP Extension if installed

    (3rd Preference) “ftpext” is to force the usage of the FTP PHP Extension for FTP Access, and finally

    (4th Preference) “ftpsockets” utilises the PHP Sockets Class for FTP Access.

    I hope it helps

    Cheers !


  • PC
    • WPMU DEV Initiate

    Hello Dave,

    As the initially reported issue in this thread has been resolved, with this post I am marking this thread as resolved.

    Should you have any further questions on this issue, please feel free to re-open the thread or create a new one :slight_smile:



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.