After installing WordPress on our Windows Server 2012, we encountered a quite strange behavior. We can’t install new plugins or update our WordPress version, it always ends up with error: 'Download failed: Destination directory for file streaming does not exist or is not writable'. For example when we want to update the WodPress version:
Downloading update from http://wordpress.org/wordpress-3.5.1-partial-0.zip…
Download failed.: Destination directory for file streaming does not exist or is not writable.
Eventually, we started to do some research on this issue. In this article, we’ll try to give an overview of this issue, explaining why this occurs on Windows and how to solve this.
ASPHostPortal.com is Microsoft No #1 Recommended Windows and ASP.NET Spotlight Hosting Partner in United States. Microsoft presents this award to ASPHostPortal.com for ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2012, ASP.NET 4.5, ASP.NET MVC 4.0, Silverlight 5 and Visual Studio Lightswitch. Click here for more information
We found that the source of the error is WordPress need to access the system’s default temp folder (C:\Windows\temp) before installing a new plugin or update its version, and IIS user doesn’t have the write and read permission to that folder.
So what we need to do is:
1. Create a temp folder in our site root directory and give IIS user the write and read permission to this folder.
2. Change the default temp directory WordPress uses by adding this line to your wp-config.php:
Now we won’t those errors when we want to install plugin or update our WordPress because it already have the permission to access the temp directory.