Support » Plugins and Hacks » [Plugin: SSH SFTP Updater Support] No wp-content directory

[Plugin: SSH SFTP Updater Support] No wp-content directory

  • I’m getting the following message when trying to install a new plugin.
    —begin message—
    Unable to locate WordPress Content directory (wp-content).
    —end message—

    I tested with Filezilla with the same connection information (using SFTP) and it put me right at the site root and I can see the /wp-content directory. I then created a file and a directory then deleted both so I know I (this sftp user) have write/modify rights to the directory.

    Also, if I try to update the akismet plugin to version 2.5.6 from 2.5.3, it pretends like it succeeds (finishes with no error messages), but when I view the plugin again, it still says 2.5.3 and tells me to update.

    Any thoughts? Thanks for your help in advance!


Viewing 8 replies - 1 through 8 (of 8 total)
  • Same problem.



    Same with me.

    Plugin Author TerraFrost


    Here’s a script that’ll help me diagnose this:

    $sftp = new Net_SFTP('www.domain.tld');
    if (!$sftp->login('username', 'password')) {
        exit('Login Failed');
    echo dirname(__FILE__) . '<br />';
    echo $sftp->pwd();

    What I’m thinking is that the SFTP server is chroot’d but Apache isn’t. So dirname() is returning something like /home/user/public_html/wordpress whereas $sftp->pwd() is returning something like /. If that’s the case one thing that could be done is to set up /home/user as a symlink to /.

    Hello. I’m having this same problem. I am using nearlyfreespeech.net as a host. What do I have to do with the script you posted above to help you diagnose and fix this issue?

    I’d really like my wordpress installation to be able to update through SSH, which nearlyfreespeech requires for security reasons. Please let me know how to help. Thank you!

    Plugin Author TerraFrost


    Just run it and tell me what the output of it is.


    Hi TerraFrost,

    I have run your diagnostic script on my shared hosting plan… I get a very deep home directory for the first line. The second line, as you suggest is the root, which seems to be relative to the home directory, not its true location on the server.

    That being said, I do not have shell access with this shared hosting plan, so creating a symbolic link is not possible. Is there a place in your code where I can hard code a reference to it?

    Thanks in advance for your assistance.

    Plugin Author TerraFrost


    #-----[ OPEN ]------------------------------------------
    #-----[ FIND ]------------------------------------------
    		$this->link = new Net_SFTP($this->options['hostname'], $this->options['port']);
    #-----[ AFTER, ADD ]-------------------------------------
    		$this->link->chdir(dirname(__FILE__) . '/../../../');

    I think that should work. I don’t have the ability to test it atm though (am at work).

    Thanks for the reply… no luck though. I tried many variations of this, up to 13 parent directories up (that is how deep the plugins directory is on the web server). Even tried putting in the literal path to WP.

    One other important fact – my host doesn’t allow an interactive SSH, though it does allow SFTP.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: SSH SFTP Updater Support] No wp-content directory’ is closed to new replies.