Windows Server 08, IIS7,php and wordpress

Posted: March 10th, 2009 | Author: | Filed under: tech | Tags: , , | 15 Comments »

[Windows Server 08]

Recently I moved from joyent to a dedicated server at softlayer running Windows server 08, reason being my free trial with them was over. I had already done a lot of testing with a unix based server and wanted to try out windows server and IIS7. I have also moved my opensocail app’s and almost everything over here. It boasts a 1GB  RAM and an Intel dual core processor(3GHz). Initially I had a lot problems setuping things, the server couldn’t boot up many a times after a reboot request, there were problem with ethernet drivers which caused it to go down every week.  Thanks to softlayer’s customer support the kinks were ironed out, prominently the updated ethernet driver from Intel fixed a lot of problems.

I am using IIS7 with fast-cgi to run my php, MySQL for storing data. For an inexperienced guy like me who is still poking around with unix but is using windows systems since childhood.. this server yielded a lot of good results,I was able to digg a lot deeper into bugs, and find the culprit code. I have a better view of things over here, eg- I could visualize the

mysql admin

mysql admin

queries being thrown on MySQL, active connections, key usage, query cache, slow queries and time taken in executing, sorting, searching and locking/unlocking tables.

LEARNING: Never use the default mysql config file thats applied after installation. This results in your perf. issues with your system resources lying used. Edit the config file to your needs, your server’s thresholds to get a boast. DO NOT  use the GUI tool to edit the config, it will mess up the settings and can prevent the MySQL from starting.. use a notepad.

You will find a lot of articles on internet for installing PHP with fast-cgi on IIS7, improving its performance.  The performance counters in Server Manager give you a lot of insight into the machine, incoming requests.

[WordPress]

This blog which runs on wordpress which inturn depends on php, mysql. The feature set, flexibility provided for wordpress is really amazing. It has a really good developer whichs provides it with numerous helpful plugins. Guess what…. now even I want to do something with it, have an idea..already started working on it :)

As I installed wordpress, I noticed that I couldn’t directly update my plugins,or  install new ones directly from admin panel. I had to download it manually and then put it in wp-content/plugins folder to install it. The error was “Download failed.: Could not create Temporary file“.
I googled, soon found out the solution  http://wordpress.org/support/topic/243300 as described by the guy in 4th post.

You need to go to folder wp-contents->properties->security tab and give read, write, modify permissions to user network service. I remember coming across permission errors like this quite a few times on IIS and PHP, the simillar approaches worked to fix them

So things were running fine.. and I went on to optimize wp on IIS7. Read an article which said to start user and kernel mode output caches on the IIS, could see some improvement. Installed the google gears plugin for the admin panel to fasten it.

I also came across an IIS filter called “IISxpress” which said that it would apply compression on  the IIS outputs and do a lot of optimization. I jumped on it and installed it.. but to my dismay.. my wordpress’s admin panel wasn’t opening. After 2-3 subsequent retries to load the admin panel crashed the app pool iteself. which resuled in “503: service unavailable” errors. I could guess that this time the culprit was IISxpress, uninstalled it(required a reboot!) and everything went back to normal.

LEARNING: Cache and Compression- you need to get them done the right, balanced way, else they can ruin an running app.

Again unix’s power I had seen, experienced and undoubtedly great once mastered, but as a beginner, at critical times I ended up googling unix, SUDOing, changing directories  rather than digging the root cause of an issue. Also on Windows server you can run php as well as ASP.NET both with decent performance.

If you are a student and would like to try out windows server 08, you can actually get licensed genuine version directly from Microsoft through the dreamspark program. This is what I did.. I first installed it on my local machine and after getting hold of it in few days.. went on to purchase the server on internet which costs me $100 a month!!

14 people like this post.