WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Download failed. Destination directory for file streaming does not exist or is n

[Resolved] Download failed. Destination directory for file streaming does not exist or is n

  • I Can’t update any file or plugins. I get this:

    Downloading update from http://wordpress.org/wordpress-3.4.2-partial-1.zip…

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

    Installation Failed

    Also my comments and contact pages are not working I get this:

    The webpage cannot be found
    HTTP 404
    Most likely causes:
    •There might be a typing error in the address.
    •If you clicked on a link, it may be out of date.
    What you can try:

    Retype the address.
    Go back to the previous page.
    Go to and look for the information you want.
    More information

Viewing 15 replies - 1 through 15 (of 33 total)
  • It is possible that you just need to give write permissions to your wp-content directory. Change the “wp-content” folder’s permissions to 755.

    Take a look at these two pages in the codex:
    http://codex.wordpress.org/Changing_File_Permissions

    And this one, regarding your .htaccess file and how it helps (or hurts you):
    http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29

    Cheers!

    Hello Henry ,

    I tried the same but still the problem exists. Is there any other solution for this???

    Thanks in advance

    If that does not work, it is a problem that perhaps only your hosting provider can resolve.

    Thanks all done

    After updating to wp 3.5 i Get this error, “Download failed. Destination directory for file streaming does not exist or is not writeable.”

    Strange, I get both on my localhost and on my hosted solution.

    I have tested the permissions for folder wp-content it has full access.

    It seems that wp can’t create a download folder – where will wp add that?

    Help needed….

    Poul Erik

    I fixed it.
    I checked the wp-config.php, and found no define about WP_TEMP_DIR.
    so I added
    define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
    in wp-config.php
    and everything works.

    Thanks! This was helpful… Another suggested was offered by Carlo Rizzarante to add the following, slightly modified lines to the wp-config.php file:

    /* Setup a temporary folder for uploading and updating */
    define( ‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/tmp/’) ;

    His explanation: …it’s a good idea to actually create a folder called tmp in wp-content. It’s also a good practice keeping order in the wp-content folder. That way the day you will have to backup or restore, you will know which files are temporary and not strictly necessary (probably left over of unsuccessful processes – delete!).

    esmi

    @esmi

    Forum Moderator

    Ideally your hosts should have created a temp directory as part of the server setup & configuration. If you’re having to add your own, then either your hosts failed to do this or WordPress isn’t picking up the correct folder on the server. If it’s the latter, we’d like to hear about it.

    Thanks, jadik – this worked!

    Add this line of code anywhere in the root file: wp-config.php

    /* Setup a temporary folder for uploading and updating */
    define( 'WP_TEMP_DIR', ABSPATH . 'wp-content/tmp/') ;

    and create a new folder named “tmp” inside: /wp-content/

    That’s it!

    For Windows shared hosting users inform your hosting company to check permissions on C:\Windows\Temp.

    I just fixed this issue with a customer I have who gave me this tip that it’s not WordPress but PHP itself.

    this is just what I needed.

    What should the permissions be set to on C:\Windows\Temp ?

    OS- | – running 2003 small biz server.

    Hi msunhats,
    http://core.trac.wordpress.org/ticket/22900
    Seems on Windows servers there is an issue with PHP is_writable function. So currently the workaround for 3.5 is to update the wp-config file (yylang1987).

    Here’s a good example that worked for me.
    http://infinitewp.com/forum/issues/download-failed-destination-directory-for-file-streaming-does-not-exist-or-is-not-writable/

    My Temp folder in my php.ini file is
    upload_tmp_dir=C:\Windows\Temp
    session.save_path=C:\Windows\Temp

    The permissions are for ISS_IUSRS is Modify.

    Pre WP3.5 everything works great. The double check may be the issue. For now I am adding the extra define to wp_config for all my sites.

    sahostking Please let me know if the Temp folder is set differently or if you find a solution.

    Hi Guys I host a Windows 2008 R2 server from home and I had the exact same problem. this is what i did to fix.
    – I gave my wp-content folder IIS_IUSRS modify permission
    – I added the line define(‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/tmp/’); to my wp-config.php file
    – then made the following changes to my wp-includes/class-http.php file
    from this:

    // Force some settings if we are streaming to a file and check for existence and perms of destination directory
    		if ( $r['stream'] ) {
    			$r['blocking'] = true;
    			 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.' ) );
    		}

    to this:

    // Force some settings if we are streaming to a file and check for existence and perms of destination directory
    		if ( $r['stream'] ) {
    			$r['blocking'] = true;
    			 if ( ! is_writable( dirname( $r['filename'] ) ) )
    			 if ( ! call_user_func( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ? 'win_is_writable' : 'is_writable', dirname( $r['filename'] ) ) )
    				 return new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) );
    		}

    as found here.
    This worked for me but i don’t know if it is an official fix.

    Thanks Nebruz 🙂
    Perhaps the changes to class-http.php will be included in the next update? With several sites to manage on a production server the wp_config line solves the issue if everything was working before 3.5.
    Thanks again for sharing.

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘[Resolved] Download failed. Destination directory for file streaming does not exist or is n’ is closed to new replies.
Skip to toolbar