So, I had the joy of trying to install WordPress on a Windows IIS Server. Now, I think it’s no secret that I hate Windows servers. It’s a personal preference, really. Mainly because any time I’ve had to deal with a Windows hosting client, the reason the host chose Windows is because they have no idea what they’re doing, and the “tech support” would disappear every time I had a question about some stupid configuration setting, and then come back three weeks later asking “Did you get it figured out yet?”
Granted, there are some people out there who know what they’re doing. But in my experience, IIS sucks unless you know what you’re doing – and 99% of the time, the people behind the server don’t have a clue.
That rant aside – I had a client who needed WordPress installed on IIS. Two-and-a-half weeks later, I got it installed. For those of you having this issue, I’m going to tell you what made the difference for me, so you don’t have to go through what I did.
Plain and simple: there were three (okay four-and-a-half) things I needed to do to get it to work.
1) Get your php.ini file off the server – at the root. If you can’t get the php.ini file, ask your host for it. Once you have it, open that sucker up in a PLAIN TEXT EDITOR, and look for “cgi.fix_pathinfo”. When you find it, uncomment it by removing the leading “;”, and if it’s set to “0″ change it to “1″.
2) Find your “memory_limit” and set it to 16 or 32 (usually it’s a “8″ – which is a headache.) Save the file, upload to root.
3) (This the the “half” tip! it’s for Mac users only) in the WP files, find “wp-settings.php” – which is located in the same folder as your wp-config.php file. At the very bottom of the file, there’s a bit of whitespace after that final “?>” Remove all that whitespace. ALL OF IT. Apparently, Macs have a different end of line (EOL) state than Windows does – and when I was trying to upload this file, I kept getting errors. You may them proceed to upload all files ot the server. BE SURE when you upload, you’re not on “automatic” or “binary”. You want “ASCII” uploads.
4) Be sure ALL folders are set at 755, and ALL files are set at 644 permissions. I didn’t realize the first time I tried this that usually, IIS sets all your stuff at basically 000 – and in that case you won’t get squat to work.
5) When I tried to install, there were no styles showing up on the page. Usually, I just go to the url and proceed (meaning, I’ll go to “mysite.com/blog” or “mysite.com” – depending on where it’s installed – and it’ll say “Looks like WP installed” blah blah) and it’ll redirect to the installation stuff. But every time I entered in my blog name and email address, it would redirect to a 404. I fixed this by loading the installation file directly, i.e.: mysite.com/blog/wp-admin/install.php
Once I did all of this, the installation went fine. I had to edit the Settings (because it was showing the WP files being one folder up form where they actually were) to get the styles to show up, and I still get a blank white page when I log in – but if I log in and get the blank white page, I change the URL manually to “wp-admin” and it’s working fine.
**NOTE: figured that one out – I forgot. Open up wp-admin/index.php, and comment out line 7: wp_dashboard_setup(); Do at your own risk though – I haven’t found anything that says this is a bad thing to do – and it may well be. But no more blank white page when you log in!**
This should be fun.