FTP Error – Update Failed Unable to locate WordPress content directory.

Updates Failed – Unable to locate WordPress content directory (wp-content).

It was working fine till this morning (all files and folders are in place), I’ve tried changing passwords and creating new FTP accounts to the root directory of the installation (even to the wp-content folder itself and I’m still getting the same error. Any help is much appreciated.

Is there hardcoded ftp login credentials like the database credentials in wp-config? And if so where might i find them?

I am able to connect FTP with Filezilla no problems, this error in WP still occurs even when using the same credentials.

  • Vaughan
    • Ex Staff

    Hi Rion,

    Hope you’re well?

    You can tryadding the following to your wp-config.php

    define('FTP_USER', 'username'); // Your FTP username
    define('FTP_PASS', 'password'); // Your FTP password
    define('FTP_HOST', 'ftp.example.org:21'); // Your FTP URL:Your FTP port

    Try with just those to begin with. If you still get the same error, try adding the following:

    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/' );

    The above need to be absolute paths though not relative paths.

    Hope this helps

  • VIP
    • Flash Drive

    I found out that I had exceeded my inode limit (it wasn’t showing in the server stats) and I resolved the problem by cleaning out the server of old junk log files.

    I can’t tell you guys how many errors I’ve received because of this, errors of all kinds all over the place, errors with emails, backup and restore, softaculous, ftp, file manager. Only when trying to use manual backup/restore did I get the error message about exceeding the inode limit and that’s what took care of all of the errors.

    Thank you for your help Vaughan, I still find your answer very useful and I’m sure others will too, it’s good to know this stuff.