How To Solve Automatic WordPress Update Problem In ByetHost and 0Fees

If you are using byethost or 0fees or any other free hosting service, you might not be able to update wordpress automatically. Updating the plugins and themes also might not be possible. You would get the following message when you try to upgrade:

Unable to locate wordpress root directory. Installation failed.

Here is the fix to it. Just add the following code at the end of your wp-config.php.

/* Fix WordPress autoupgrades on Byethost and 0fees */

putenv('TMPDIR=' . ini_get('upload_tmp_dir'));
if(is_admin()) {
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );

Leave a Comment