WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Download failed. Destination directory for file streaming does not exist or is n (34 posts)

  1. willnanc
    Member
    Posted 1 year ago #

    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

  2. Henry Perkins
    Member
    Posted 1 year ago #

    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!

  3. panindranadig
    Member
    Posted 1 year ago #

    Hello Henry ,

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

    Thanks in advance

  4. Henry Perkins
    Member
    Posted 1 year ago #

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

  5. willnanc
    Member
    Posted 1 year ago #

    Thanks all done

  6. Poul_Erik
    Member
    Posted 1 year ago #

    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

  7. yylang1987
    Member
    Posted 1 year ago #

    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.

  8. jadik
    Member
    Posted 1 year ago #

    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!).

  9. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    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.

  10. StephenWise
    Member
    Posted 1 year ago #

    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!

  11. sahostking
    Member
    Posted 1 year ago #

    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.

  12. eswallace2001
    Member
    Posted 1 year ago #

    this is just what I needed.

  13. msunhats
    Member
    Posted 1 year ago #

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

    OS- | - running 2003 small biz server.

  14. kbunt
    Member
    Posted 1 year ago #

    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.

  15. Nebruz
    Member
    Posted 1 year ago #

    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.

  16. kbunt
    Member
    Posted 1 year ago #

    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.

  17. sociozilla
    Member
    Posted 1 year ago #

    To fix the issue on my local windows 7 test server, what I did was give modify access to the website folder and the C:\windows\temp folder to the following accounts: Network Service, Network, IIS_IUSRS, IUSR. Hope this helps someone.

  18. quilt9
    Member
    Posted 1 year ago #

    @StephenWise

    Thanks! It worked! Saved me a lot of headaches. Thanks for sharing.

  19. yosukehasumi
    Member
    Posted 1 year ago #

    I had an issue with my plugins updating as well, IIS server and WP 3.5:

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

    So following @ yylang1987 advice I added

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

    Still no cheddar, but followed up with @Nebruz advice and updated class-http.php lines 141 - 145 (approx).

    // 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.' ) );
        }

    But then I got...

    Downloading update from http://downloads.wordpress.org/plugin/whatever.zip
    Unpacking the update
    Deactivating the plugin
    Removing the old version of the plugin
    Could not remove the old plugin
    Plugin upgrade Failed

    So following this post (http://wordpress.org/support/topic/plugin-upgrade-failing-cannot-remove-old-plugin?replies=25) and @ detroiter advice I updated the wp-config.php file with...

    define('FS_METHOD', 'ftpsockets');
    define('FTP_BASE', '/path/to/wordpress/');
    define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
    define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
    define('FTP_USER', 'username');
    define('FTP_PASS', 'password');
    define('FTP_HOST', 'ftp.example.org');

    SUCCESS!
    Thanks gang, super helpful.

  20. mstfcbn
    Member
    Posted 1 year ago #

    define( 'WP_TEMP_DIR', ABSPATH . 'wp-content/tmp/') ;

    I was finding a solution to fix this problem since last week.
    It worked for me.
    Thanks!

  21. bigwelly
    Member
    Posted 1 year ago #

    Great thanks to Poul_Erik and StephenWise

    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!

    Not forgetting to set the folder and sub-folders permission to 755

  22. BinoCom
    Member
    Posted 1 year ago #

    Hi Just want to say thanks to StephenWise for breaking down the steps, that worked or me.

  23. Shonu
    Member
    Posted 1 year ago #

    This only worked for me after setting 777. Eventhough I was able to add and remove files using the same FTP account WP was asking me before installing plugin, WP could not manage the same until 777.Odd

  24. lmenz
    Member
    Posted 1 year ago #

    I had the same problem with version 3.5.1 and solved it by moving the htaccess file in the wordpress directory instead of the root directory.

  25. wphelp11
    Member
    Posted 11 months ago #

    Here is a solution for self hosting iis users using fastcgi with php.

    First make sure you have the uploads folder in your wp-content folder.
    Second add the user everyone to the folder wp-content with modify permissions. Restart iis and test image upload in WordPress.

    If it works your on the right path here.
    Now remove the everyone user and add the NETWORK SERVICE user to this folder.

    But wait! I do not know how to add the everyone user or the NETWORK SERVICE user to my wp-content folder?

    Browse to the folder and right click on it.
    Select the properties option.
    Now select the security tab at the top.
    Click the edit button.
    Click the add button.
    In the select users or groups text field enter in:
    NETWORK SERVICE
    click the ok button.
    In the section Allow: check the modify box.
    Click the ok button.
    It will run for a bit then click the ok button
    on the property window and your done.

    I used the everyone user to check if this issue was a folder permissions issue only. Then used the NETWORK SERVICE user based on fastcgi set up information. depending on your set up with fastcgi it could be a different user so you will need to start testing users to find the right user you need.

    It seems logical that this could be the same issue others are having with themes updates and plugins as well. I am not sure if the NETWORK SERVICE user needs permissions over all of the wp-content folder yet it seems like it is needed.

    I hope this helps some of you WP users out there as it took me a few nights to figure this one out.

    I would also like to say thank you to all the users who report back full solutions to issues they have found closing the loops and ending the searches.

    We need more of you. :)

  26. j007jim007
    Member
    Posted 11 months ago #

    This worked for me;

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

    But make sure you don't try and type it in the file, copy and paste worked for me!

    Good luck.

  27. tradiecorp
    Member
    Posted 11 months ago #

    i tried that but unfortunately it didnt work.
    i have tried deleting wp folders excepr for content and then ftp new downloads of folders and adding
    /* Setup a temporary folder for uploading and updating */
    define( 'WP_TEMP_DIR', ABSPATH . 'wp-content/tmp/') ;
    also created a tmp file within wp-content with premission 777 (although i hear 755 should work)and have change permissions for all other tmp folders and uploads folder
    i have been struggling with this problem for too long now, please someone help..the only thing i can think of is to uninstall everything and start again but there must be an easier way
    thanks in advance

  28. esmi
    Theme Diva & Forum Moderator
    Posted 11 months ago #

    Have you contacted your hosts about this. It's really a server issue - not a WordPress one.

  29. tradiecorp
    Member
    Posted 11 months ago #

    ive seen someone else say that it was a server issue and ask to put on linux server rather than a windows one
    however this problem only exists on sites with wordpress 3.5
    i have other sites pre 3.5 wp same host and they are fine as soon as i upgrade to wp 3.5 i have encountered this problem on numerous sites?

    so should i ask my host to change permission on my uploads folder or tmp folder to align with the permissions i have set up in cpanel?

  30. CocoCarina
    Member
    Posted 10 months ago #

    I'm having the same issue. Can't update my WP or any plugins. Running WP 3.5 and have followed the suggestions above of changing permissions and followed what yosukehasumi suggested. Still no go. Super frustrating and my host is of absolutely no help. They think it's a WP issue. Any other suggestions would be much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic