I tried to use the automatic update feature for WordPress Plugins on my Windows Server 2008 R2 with IIS7. I setup the FTP account and entered the setting in WordPress. But unfortunately it did not work.
After setting
define(‘WP_DEBUG’, true);
in the wp-config.php file I got the following error messages:
Updating Plugin SexyBookmarks (1/1)
Downloading update from http://downloads.wordpress.org/plugin/sexybookmarks.4.0.4.2.zip…
Warning: touch() [function.touch]: Unable to create file C:\inetpub\wwwroot\some_blog/wp-content/sexybookmarks.tmp because Permission denied in C:\inetpub\wwwroot\some_blog\wp-admin\includes\file.php on line 177
Warning: fopen(C:\inetpub\wwwroot\some_blog/wp-content/sexybookmarks.tmp) [function.fopen]: failed to open stream: Permission denied in C:\inetpub\wwwroot\some_blog\wp-includes\class-http.php on line 1070
Warning: unlink(C:\inetpub\wwwroot\some_blog/wp-content/sexybookmarks.tmp) [function.unlink]: No such file or directory in C:\inetpub\wwwroot\some_blog\wp-admin\includes\file.php on line 489
An error occurred while updating SexyBookmarks: Download failed. Could not open handle for fopen() to C:\inetpub\wwwroot\some_blog/wp-content/sexybookmarks.tmp.
You need to do the following two things to fix this:
First, add this to your wp-config.php file:
define(‘WP_TEMP_DIR’,ABSPATH.’wp-content/uploads/’);
Second, give the IIS_IUSRS account read and write access to the wp-content folder.
That should help.
4 Kommentare zu “Download failed. Could not open handle for fopen()”
thank you so much!!!
🙂
Thank you Rémy for this, one of my friend’s wordpress blog was having this issue and I have solved the problem using your suggestion (defining temporary directory).
Hi
I’ve managed to do step 1 but I don’t know how to do step 2. What is IIS_IUSRS account and how do I add the relevant permissions to it?
Thanks!
IIS_IUSRS should be a user in your Windows System.
http://www.iis.net/learn/get-started/planning-for-security/understanding-built-in-user-and-group-accounts-in-iis