Jump to content

Recommended Posts

Posted

I recently changed our website from Centos/Joomla to Ubuntu/Wordpress and every likes to new website etc...

 

I've been looking at https://developers.google.com/speed/pagespeed/ to see how I can improve various aspect of the website.

 

One of the things flagged was response time at 2.4 seconds..... to me that seems fine but looking at various things Litespeed is supposed to work up to 6 times quicker with php pages etc....

 

 

So..... have anyone swapped Apache to Litespeed via commandline as all I can find are reference to CPanel.

 

Alternately - should I spin up another VM and install from scratch with Litespeed and move the website over.

 

Any tips welcomed :D

Posted

I'm totally certain that you can get performance good enough for a Wordpress site without having to resort to changing away from Apache. *YES* there are faster - my favourite being nginx with PHP-FPM, but apache is more than capable unless you're getting a really heavy amount of traffic and the hardware is struggling.

 

I run our school site from ubuntu/apache and average homepage load time is around 350ms. We have a number of plugins loaded.

 

The single biggest performance boost I have found (and it doesn't just apply to Wordpress) is to ensure PHP has an opcache enabled - a store of the compiled PHP code ready to run instead of recompiling every time a php file is loaded. If you're on a recent Ubuntu - the shipped PHP package (from the PHP 5.4 release or later) should be able to have its built-in opcache enabled, no more software to install, just a config change.

 

This should immediately give you a relatively decent boost to performance.

 

You can try a guide such as this: How To Enable PHP 5.5 Opcache on Ubuntu 14.04 for a basic configuration of it. On my server I've given the opcache 128MB of memory - of which it seems to only ever use up to around 80, so you're losing a tiny bit of memory but gaining a much faster execution time for PHP elements of the site.

 

For a decent guide of before/after performance you can use Chrome with the F12 developer options, and in the network tab, ticking the 'disable cache' box. This will let you browse the site without your browser cache 'hiding' any latency, it also gives you page loading times.

 

There are other things you can do - but enabling the opcache alone should give a big boost.

 

I've used opcaching alone to make a fairly large wordpress site go from 4 seconds per page load to under 1 second, for a simple config change. Its a transparent change for wordpress - no code needs changing or plugins need adding - but makes a huge difference to performance, and will lower CPU usage significantly too.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...