Update WordPress Unable to locate WordPress Root directory. Installation Failed

When you try to update WordPress you get the error:

Update WordPress

Unable to locate WordPress Root directory.

Installation Failed

This problem is solved by adding the following code to the wp-config file:

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

(source: http://wordpress.org/support/topic/autoupdate-unable-to-locate-wordpress-root-directory)

You will then get the error:

Downloading update from http://wordpress.org/wordpress-3.3.2-partial-1.zip…

Unpacking the update…

Could not create directory.: /home/nginx/domains/mysite.com/public/blog/wp-content/upgrade/wordpress-3.tmp

Installation Failed

This means that there is a permission problem. Just chmod the wordpress core files to 777 and you should be okay.

# cd /home/nginx/domains/mysite/public
# chmod -R 777 *

R means that a recursive change will be made.

3 thoughts on “Update WordPress Unable to locate WordPress Root directory. Installation Failed

Leave a Reply

Your email address will not be published. Required fields are marked *