Ok. Let solve this one as well.
Basically how wordpress works on IIS is a lot different than how it works on apache server. There are lot of things to consider and lot of windows stuff that interfere with it.
After solving each problem one by one finally I’m not able to show images on the front end on any of my post so I looked around the internet and solved it.
The core of the problem was the permissions to uploaded files. When I upload the file using wordpress’s media section, it uploads the file to temp folder of windows. Specifically talking, System temporary folder that is located under C:\Windows\Temp.
The problem is that IIS_IUSRS doesn’t have any permission on this folder so the uploaded file also doesn’t get any. And after trasfering it to “Uploads” folder of wordpress directory, The permission to IIS_IUSRS remains the same which is none and as a result……….wait for it………..We can’t access the file from the front end.
Basically there are 2 solutions to this problem
- I can assign read,write and execute permissions to IIS_IUSRS which worked like a charm actually. 👍
- Or I can edit php.ini file and change the temp folder path to other folder that IIS_IUSRS can read,write and execute.