Edit: Question Clarification: Amongst other things, what do people believe to be the ideal PHP 'Handler' for EE?

We've decided to take the plunge and get another VPS for some of our production sites. Our current server is running suPHP so we can't install APC (according to the host).

So my question is, for performance, how should we ask them to set up our server?

We will keep our old server for development, so we don't want it to be massively different, and they are suggesting FastCGI so that they can install APC, but is FastCGI good/bad/bad for EE?

We also will be running a couple of Laravel3 and 4 on the new server, so if there are any additional recommendations, please tell me.

I wish I wasn't such a sysadmin noob, but after Tim Mahoney's talk at EEUK, we want to make sure we get the server set up right from its beginnings.


2 Answers 2


In my experience suPHP tends to have a small negative impact on overall performance, and either FastCGI or mod_php (DSO) will run faster with less resource use, specifically CPU use. FastCGI uses noticeable more memory than DSO, but on the other hand is arguably 'more secure' than DSO for a multi-site environment. For securing DSO, mod_ruid2 might be an option to consider; I've not actually used it yet but I've heard that it provides similar security advantages as suPHP with better performance.

As for opcode caches, you won't be able to run APC with suPHP. I consider APC to be essential for EE sites; without it a blank template will use 10Mb of memory, with it enabled that falls to 3Mb or so. Eaccelerator is also a perfectly decent option (if you use DSO) that seems to be stable with EE sites, but of course if you're using something like CE_Cache then having APC available is going to provide you with another driver option for caching.

To avoid the unnecessary overhead of running static assets through Apache I usually setup Nginx as a reverse proxy, so that only PHP requests are passed through to Apache. If you use cPanel, Nginx Admin is an easy way to do this.

Finally, you will need a firewall for your server; for cPanel CSF is the obvious choice, and it also provides extremely useful tips on securing your hosting environment.

  • We're currently going with mod_php + mod_ruid2 + APC. Memory use has more than halved :}
    – Rob Hodges
    Commented May 29, 2013 at 17:26

Thanks for listening to my talk and staying awake. It really is crucial to get a good base setup and thanks for reaching out to us for advice.

Key mods we use suPHP, EAccelerator, Deflate, File Cache, MemCache, FastCGI (and some other non-cache related mods) and EE works very fast. Not sure on APC but I cannot imagine there being much difference.

The key will be the DB config and Disk speed as everything runs from the DB or sometimes cached files. Caching a bit of PHP probably wont make much difference but EE Debug can tell you that if you were to benchmark the two options suPHP and APC. You can then make a decision before production.

We did have a client in the US using server side cache and combined with EE had some profound effects. They were changing PHP in templates and it didn't change on the front end. Clearing EE cache wouldn't make a difference so if you start to get this and are using a server side caching system, try turning it off. I believe this was a third party system though.

Good luck with the setup, nothing like a nice new server to play with.

This was interesting http://redmine.lighttpd.net/projects/1/wiki/docs_performancefastcgi ... and if you are thinking about APC on a VM http://chrisgilligan.com/wordpress/how-to-configure-apc-cache-on-virtual-servers-with-php-running-under-fcgid/



  • Thanks Tim! Your talk was especially interesting as we are having some performance issues on one of our sites at the moment. I am really a sysadmin noob, so I'm really interested in what people are using for their PHP setup. I see you say you are using FastCGI and suPHP but I thought they couldn't be run simultaneously?
    – Rob Hodges
    Commented May 22, 2013 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.