Possible to Remove mod_php without issues on wordpress sites?


#1

I have found documentation on the web which states the following:

“Enabling FastCGI for all PHP switches your site over to using mod_fcgid”

There is an checkbox option in the Dreamhost PS configuration page which states:

Disable mod_php:
Removes mod_php from the Apache web server. This will save a significant amount of memory if your site serves a lot of static :content. PHP-intensive sites may benefit more from setting all domains to use mod_php in Manage Domains and enabling a PHP cache"

So could I do disable mod_php if all my sites are configured as Fast CGI without an issue to save a bit on the memory? My websites are all wordpress sites. Xcache is of course enabled as well.


#2

mod_php is not used on DreamHost VPS unless you’ve configured domains to use it — the current default is to use PHP via FastCGI (using mod_fcgid).

If you aren’t specifically using mod_php on any sites, you can turn it off and save some memory — there’s really no downside.


#3

Thanks for the reply Andrew :slight_smile:


#4

Is it possible to disable it on VPS with a lighttpd webserver? I tried disabling it and all my php.cgi processes went away, im using fcgi exclusively.


#5

That’s what that option does for lighttpd — it’s only with Apache that you have a choice between an embedded PHP (mod_php) and an external one (cgi / fcgi).


#6

Ok let me see if I get this right, if I disable mod_php when webserver is lighttpd that will disable php support on the webserver, on lighttpd fcgi is the only option right?


#7

Correct. Since lighttpd and nginx both only support one way of running PHP (FastCGI), the “disable mod_php” option instead turns off PHP entirely for them. I’ll readily admit that it’s pretty weird.


#8

Yeah it is a little bit confusing at first, because there is article in the wiki that says you can disable mod_php if you are using fcgi purely to save memory. Doing that disables php support though :). Guess that article refers to apache only.