Error when updating plugins by FTP “Unable to locate WordPress Content directory (wp-content).” SOLVED

Error when updating plugins by FTP “Unable to locate WordPress Content directory (wp-content).” SOLVED

if(is_admin()) {
    add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
    define( 'FS_CHMOD_DIR', 0751 );
}

Hope this helps.