Để cho các bạn dễ dụng khi làm, nội dung cung cấp bài viết nguyên thủy bằng tiếng Anh. Các bạn đọc, thực hành và chia sẻ kinh nghiệm với mọi người.
First, download and install the FastCgi Extension for IIS 6 from microsoft.The FastCGI protocol enables PHP applications to be hosted on the IIS web server in a high-performance and reliable way.FastCGI re-uses CGI processes for multiple requests, which provides a significant performance boost as compared to CGI.
Once FastCgi is installed, Config FastCGI extension to work with php:
1. Open a command line window,and change the current directory to %WINDIR%\system32\inetsrv.
cscript fcgiconfig.js -add -section:”PHP” -extensionhp -path:”C:\PHP\php-cgi.exe”
to register the PHP CGI program as the one that will be processing .php extensions.
3. Modify fcigext.ini file in %WINDIR%\system32\inetsrv as the following (assuming you installed PHP to C:\PHP folder):
Next,download and install eAccelerator.eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.
After eAccelerator is downloaded:
1. Copy eaccelerator.dll to your php extensions folder to c:\php\extensions.(assuming you installed PHP to C:\PHP folder)
2. Create a folder (with the appropriate permissions) for the temporary cached files.
For example: c:\tmp\eaccelerator
3. Add the following to your php.ini (as the first loaded extension):
eaccelerator.keys = “shm”
eaccelerator.sessions = “shm”
eaccelerator.content = “shm”
That’s all,restart your IIS and you’ll get a faster WordPress on windows IIS 6 with highly boosted performance.
Because IIS does not support mod_rewrite module for rewriting URLs,the biggest problem hosting wordpress on iis is that you always get an ‘ugly’ and not SEO-friendly index.php in your permalinks.you can install wp_url_rewriting,an open source URL rewriting for wordpress, to resolve this issue.