I run apache2 on Ubuntu, i'm sure there is a configuration or permission problem causing this. When I attempt to update plugins through the admin control panel, after I enter the FTP login/pass and click Proceed. I get the error "Unable to locate WordPress Content directory (wp-content)."

And wp-content does exist and have proper permissions from the default install.

4 Answers 4


I ended up using code from this post on WordPress.org

Place this into my wp-config.php file

if(is_admin()) {
    add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
    define( 'FS_CHMOD_DIR', 0751 );
  • 1
    This code help to me, but I placed it to functions.php in my theme folder.
    – Denis
    Commented Apr 11, 2014 at 11:02

The FTP user account likely does not have access to the wp-content directory. Are you able to access wp-content using an FTP client with the same user account?

Another solution is to change the owner of wp-content to www-data. You can do this from the command line by running chown www-data:www-data wp-content/ -R

  • Yes I am able to FTP in with that account and view the files. I tried changing owner as you suggested for that directed recursive but still getting the error.
    – Anagio
    Commented Nov 30, 2011 at 7:59

Can you try changing ownership via SSH or sFTP.

Here is the command: chown -R username *

replace username with your actual primary username that you use to login to your cPanel or FTP.

Once you have done this please change the permission of your wp-content as mentiones by @Chris_O


What resolved for me on Lubuntu 14 was the following:

chown www-data:www-data /var/www/html -R

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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