If you run into problems trying to update WordPress, install new plugins/themes, it could be caused by the temporary directory WordPress uses for downloads. You can easily fix this by defining a WP_TEMP_DIR in your wp-config.php file below.
WordPress download Failed Errors on Update or installing new plugins/themes
Download failed.: Destination directory for file streaming does not exist or is not writable.
Installation Failed
Define a WP_TEMP_DIR in your wp-config.php file
If you've encountered the issues, you can simply follow the steps below to resolve them.
-
Open you wp-config.php file with
-
You should see this code towards the top of the file:
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'dbname');
Place this definition of define('WP_TEMP_DIR', ABSPATH . 'wp-content/'); in-between the lines mentioned above, so it ends up looking like this when you've completed it:
* @package WordPress
*/
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'dbname');
Now Save your wp-config.php file.
-
Try to update WordPress, installing new plugins/themes again, if for some reason it is still failing, be sure to check file permissions on your wp-content folder, and ensure it's set to read and write so that the server can write to it.
Article ID: 1985, Created: September 26, 2018 at 5:50 AM, Modified: September 26, 2018 at 5:56 AM