IIS WordPress Error 500 (rewrite)

This problem is caused because PHP first uploads the document to a temporary directory

(by default C:WindowsTemp), and then moves it from that directory to the actual

/blog/wp-content/uploads/ subdirectory.

What happens is that because IIS does not have any permissions to your “C:WindowsTemp” directory,

when the file is uploaded there, then moved by PHP, the file inherits NO permissions.

So when IIS trys to serve out that file from your /blog/wp-content/uploads/subdirectory

it throws a 500 error and that is actually a permissions error.

The solution: on the WindowsTemp folder, grant “modify” permissions to both IUSR and

{servername}IIS_IUSRS user accounts.

Now when you upload files via PHP and PHP moves them to the correct directory, the files will

have the correct permissions and can be accessed.

Important note #1: If you already have uploaded files and are getting the dreaded broken images

issue, go to the /blog/wp-content/uploads/directory and replace/update the permissions

to add access for both user accounts noted above. That will solve that issue.

Important note #2: as with any change off the defaults for Windows, you do this AT YOUR OWN RISK.

It’s up to you if you want to grant the WindowsTemp directory permissions for those two accounts.

If you don’t PHP won’t be able to upload without the 500 issue

(unless you move the PHP temp folder elsewhere and grant those accounts access to the other folder).

Do these changes at your own risk… I cannot and won’t take any responsiblity for your systems.

Please know what you are doing.

Blog List
An unhandled exception has occurred. See browser dev tools for details. Reload 🗙