After transferring the WP site to the hosting service, when updating plug-ins, an error occurs:

Error while updating PluginName: Download failed. The destination directory for the file stream does not exist or is not writable.

There are no errors in the console. The database was transferred normally, the site is working.

wp-config.php:

..... if ( defined( 'WP_CLI' ) ) { $_SERVER['HTTP_HOST'] = 'localhost'; } define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']); define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']); /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); define('WP_TEMP_DIR', 'http://' . $_SERVER['HTTP_HOST'] . '/tmp'); ..... 

I try and so:

 define('WP_TEMP_DIR', 'http://' . $_SERVER['HTTP_HOST'] . '/upgrade'); 

Question: how to configure update WP plug-ins after transferring the site to hosting?

  • Rights to directories / files. Must be 755/644, the owner is the one by whom php is executed. WP_TEMP_DIR no case WP_TEMP_DIR , it is better to remove these lines from wp-config, as well as WP_CLI - KAGG Design
  • @KAGGDesign, thanks removed the lines and earned! - HamSter

0