Getting the WordPress error Unable to locate WordPress Content directory (wp-content) when trying to update Themes or Plugins? Here is the solution:
- Via FTP, open the wp-config.php file.
- Add the following to the end of wp-config.php (change the ftp and path details as needed):
define(‘FS_METHOD’, ‘ftpsockets’);
define(‘FTP_BASE’, ‘/public/www/’);
define(‘FTP_CONTENT_DIR’, ‘/public/www/wp-content/’);
define(‘FTP_PLUGIN_DIR ‘, ‘/public/www/wp-content/plugins/’);
define(‘FTP_HOST’, ‘ftp.domainname.com’);
define(‘FTP_USER’, ‘ftpuser’);
define(‘FTP_PASS’, ‘p855w0rd’);
define(‘FTP_SSL’, false); - Save the changes.
