WordPress 3.5 & Windows: Plugin Update and Install Issue Quick Fix

Anyone got plugin update or install issue after updating to WordPress 3.5? Is this your error message:

Download failed. Destination directory for file streaming does not exist or is not writable

This issue is not limited just to plugins, it’s affecting themes, and whole WordPress, you will not be able to update anything at all!

Here is ticket connected to this issue: http://core.trac.wordpress.org/ticket/22900

So there are 2 things you need to do:

Go. to wp-includes/class-http.php and find this 2 lines:

if ( ! is_writable( dirname( $r[‘filename’] ) ) )
return new WP_Error( ‘http_request_failed’, __( ‘Destination directory for file streaming does not exist or is not writable.’ ) );

And comment them out (just add // in front of them)

This is actually secondary check and its unnecessary, also any path returned by get_temp_dir() method should be writable by default. So this needs to be removed or make it compatible with Windows!

Second thing that you need to do is to add one line of code in yours wp-config.php file:

define( ‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/’ );

This issue is already fixed for WordPress 3.5.1 version, but this is quick fix so you can do it now.

Did this fix worked for you?


  1. Frank Lucas · December 18, 2012

    Nope. Did nothing for me.

  2. mdmetcalf · January 20, 2013

    That worked for me! Thanks a bunch!

  3. Macrina · August 26, 2013

    Great! 10x! That worked for me!

  4. Rama · December 24, 2013

    Did nothing for me to.
    Download failed. Could not open handle for fopen() to /home/www.xxxxxx.xxx/html/wp-content/a_plugin.tmp

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s