How to enable FastCGI for a WordPress site hosted on Dreamhost

[box]CMS: WordPress  Difficulty Level: normal  Time: 10 min[/box]

FastCGI is now enabled by default on Dreamhost right?. But It does not mean it’s rendering the pages for your WordPress blog automatically. In order to get FastCGI to render pages for your WordPress site on Dreamhost you have to make below changes to your .htaccess file and create a .fcgi script. It’s little time consuming. But hey! it worths the efforts. Because it has decreased the memory load on my PS server by 70%. I am using the exact below configuration and I am using it on Dreamhost VPS and I guess it should work for all the sites hosted on Dreamhost provided FastCGI is enabled on their Domain.

Step.1 Create .fcgi script called ‘ dispatch.fcgi ‘ and put below lines of code in it.

#!/bin/sh
exec /dh/cgi-system/php5.cgi $*

Step 2. Upload this file (dispatch.fcgi) in the root of your domain or where you site is hosted or where .htaccess file for your domain resides.

Step 3. Put below lines of code at the beginning of your .htaccess file in the root of your domain and upload it after making the edits.

Options +ExecCGI
AddHandler fastcgi-script fcg fcgi fpl
AddHandler php5-fastcgi .php
Action php5-fastcgi /dispatch.fcgi

That’s all. You should have FastCGI enabled for your WordPress site hosted on Dreamhost. below is btw, the screenshot of my VPS showing decrease in memory usage.

[hr]



Hello my name is Imran Jafri, I am the Editor and founder of Maboot Mag. I am extremely passionate about Web design, UX and GUI. I love to play with PHP, javascript and Wordpress. Of course I am a MAC and using Ubuntu as my secondary OS. That's all.

Share This Post

Leave a Reply

© 2017 Maboot.com. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie