WordPress Image Upload Problem using IIS on Windows Server 2008

by Matt on September 24, 2009

We had some issues at work with uploading images to our WordPress blog. It was super annoying. We kept getting the following error when trying to upload an image using the Upload/Insert function in WordPress:

“The uploaded file could not be moved to C:\inetpub\www\website\wp-content\uploads”

It was difficult to find a solution because there is a large majority of WordPress users who use Apache as the web server. I was finding little info on IIS7 and Server 2008.  I saw plenty of forum posts with the exact problem.  The particular poster would then reply to his own detailed question and say “Thanks everyone! I figured it out on my own.” Ah WHAT? Post what your solution was so it benefits the community. So this is why I am posting this on my blog.

Most of the recommenced solutions were to give the IUSR account write/modify permissions to all the directories down to the uploads directory.  This did not work for me.  We dug into IIS7 and started looking at the authentication section of IIS7 for that site. “Anonymous Authentication” was set to a user that did not exist. So we changed it to use the application pool identity and it worked great.

WordpressUploadIssue2

Go to the authentication section of the site.

WordpressUploadIssue4

Select the "Anonymous Authentication" from the middle list once in the authentication section of the site.

WordpressUploadIssue5

Click on Edit on the Action menu on the right side.

WordpressUploadIssue

Select the Apllication pool identity radio button

This worked great. I could instantly upload a image to a WordPress post.  I hope this helps you out in your journey to solve the permissions issue with the image unloader in IIS7 and WordPress.

Feel free to comment if the solution worked for you.

  • Anonymous

    This worked for me, I had the same problem you did with finding a solution. Thanks for the tip.

  • Anonymous

    thank you very very much…

  • Anonymous

    This worked for me, I had the same problem you did with finding a solution. Thanks for the tip.

  • Anonymous

    thank you very very much…

  • http://www.bloganavazquez.com/ Aberrabike

    Perfect! Works for me!

    Thank you very much

  • Rick

    THANK YOU!!! I saw many of the posts you reference, i.e., “Thanks, I figured it out on my own” along with other helpful replies like “You should switch to Apache” etc. etc.

    This worked like a charm. Next time I’m in MN I owe you the beverage of your choice.

  • http://www.mbrauchler.com Matt

    Glad I could help Rick! I posted this just for the reasons you commented on.

  • http://twitter.com/hserdarb serdar

    thank you very very much…

  • http://twitter.com/hserdarb serdar

    thank you very very much…

  • Jack

    This worked for me, I had the same problem you did with finding a solution. Thanks for the tip.

  • http://pulse.yahoo.com/_JXEGHEOYUMNN2I3TXTZVMRINCQ Jeff

    Thanks buddy!

  • rcm01

    Thanks very much. Getting WordPress installed on my 2008 server has been ridiculously arduous. Hopefully the most important thing that someone gets out of this is your point on posting the solutions you find yourself.

  • Oskar Reftel

    THANK YOUUUUUUUUU!!!!!!

  • Oncemor

    Hey this was a great help.nnAnyone aware of Security issues with opening Application Pool Identity?n

  • Guest

    Holy Jesus- this was the most annoying problem. You are so right- 10,000 forum posts of everyone having the same problem, and not a word on wordpress.org forums giving any clue how to solve, but everyone just yammering on about file permissions and crazy mods to the wordpress installation. Of all the fixes, the one above is apparently the only actual solution, and it isn’t shown anywhere. Thank you, thank you, thank you…

  • Pingback: Handling “Permision denied” in IIS « Charles Strahan's Blog

  • Rbobaru

    Yes, this worked – but you must also, using windows explorer, go to the ‘uploads’ folder and set permissions for II_IUSR ‘modify and write’. Then, it worked for me.

  • Luis Angel Camargo

    thank you man, I had a similar problem. WordPress uploaded the image in the correct folder, but it wasn’t appeared in the browser. I owe you a beer!

  • Pingback: Поставил свой Wordpress на ISS 7.5 | asptuts - уроки asp.net, mvc

  • Roberto

    Thanks for taking the time to help the community by posting the solution. This worked like a charm for me.

  • Pingback: Word Press e IIS 7 amici ma non troppo :@ !!! « RicDeb

  • Pingback: Решаем проблему с загрузкой файлов на Wordpress | Блог Бафа

  • Allan

    This didn’t work for me! But I gave IUSER Write permission to uploads folder and that worked…
    I don’t like that I can’t change this from the IIS manager.

  • Tom

    Thanks, for that post!! I hate that when people say “Thanks everyone! I figured it out on my own.” It cost me several hours to find the solution, so thanks!!!!!

  • wethanet

    Perfect thanks.  Had tried setting permissions on folders, but new files never inherited those permissions.  This worked a treat.

  • Schorsch

    Thx for sharing. Works like a charm!

  • Nick

    Thanks, I was missing this step. Now it works!

  • Anthony

    Thank you!!! This was making me crazy!

  • Kostik

    Thanks very much.

  • Peicheck

    THIS WORKED FOR ME!

    WOHO!!!!thanks!

  • Mart

    Great fix. Thanks for sharing.

  • Dee

    Fabulous, this saved me a lot of pain! Worked perfectly.

  • Bug

    Thank you, thank you. I spent about a a day and a half on this until a Bing search for “wordpress can’t upload images+IIS” brought this up at #2 reference. Wonderful.

  • Teknologist

    Thank you so much for posting this! This drove me crazy for a while!

  • http://www.facebook.com/mon40 Mark Monforti

    Any thoughts on IIS4?  I am having the same problem.  One other thing that worries me is the slashes are backwards

    The uploaded file could not be moved to C:wordpress/wp-content/uploads/2012/04.

  • phantom

    If you had single sign on configured that’s using the Windows authentication for the site, this could probably be not the solution. It’s better to stick to the IUSER permissions.

  • Pingback: the upload file problem | eleveneven

  • Palani P

    wow… thanks this is working perfectly.

  • Gordon

    Just discovered this post had exactly the same problem and your advise was superb all on my side working now. I sometimes think that Microsoft sits and plans for hours as to how to make these issue complicated!
    Best wishes and thanks Gordon

  • El Loko

     This also resolve that issue with not being able to auto-update from 3.1 to 3.4

  • Email

    Thankyou!

  • Ralph Lindner

    thank you for sharing your solution!

  • Dclar162

    I too was concerned with the app_pool identity solution…though it does work, I did not want to open a security hole. This guys solution actually worked as well. http://wordpress.org/support/topic/iis-image-upload-view-issues  As stated, because on Windows, wordpress uploads to a temp directory, then copy the files to the uploads directory, thus inheriting the permissions from the temp dir (which does not have Iusr access. I followed the recommended steps with creating a new temp dir c:wordpress_upload_temp, giving iusr read/list access and in the php.ini file (usually located at C:Program Files (x86)PHPv5.3) setting the following property value upload_tmp_dir = c:wordpress_upload_temp
    check out Danny_T solution on this forumhttp://wordpress.org/support/topic/iis-image-upload-view-issues
    Hope this helps as an alternative for those concerned with security on a production server. Cheers..DeShon

  • chris

    Thank you for this!

  • Chris P

    This worked for me. Thank you thank you thank you!

  • http://www.facebook.com/kcizzle KC Abramson

    I can’t thank you enough for this post

  • scenario77

    my hero

  • It works!

    thank you!!

  • Igor Salma

    Thanks man!! :)

Previous post:

Next post: