SHARE

Updating wordpress via Automatic upgrade is easy,fast and may be safe way to upgrade wordpress but in some hosting you may get errors like

Unable to locate WordPress Root directory.
Installation Failed

WordPress installed on Linux host have this problem (specially on shared server). This problem occurs in byethost hostings also. Since my website/blog was also installed in one of the byethost reseller. I also experience this problem, after searching for possible solutions in google, I found 2 solutions which I thought might solve my problem. 1st solution was to create another FTP account and redirect it to wordpress directory, since my host did not allow more that 1 ftp I was not able to do so, and I found it confusing as well.
Second solution was to edit “wp-config.php” file, I choosed 2nd option. All I did was, edited “wp-config.php” by adding this code at the end of line (at Line 79).

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

After adding this code automatic upgrade and installation of plugins/theme worked perfectly and smoothly updated my blog in less than 10 second.