WordPress can be used with small websites that receive just a few visitors all the way up to large enterprise websites that receive millions of visitors each month. However, in some situations where are receiving a number of visitors, businesses may not be seeing the most efficient use of their server resources. The following are just some of the techniques that can be used to optimise the performance of WordPress, which in turn will see the your system resource usage drop.
The purpose of caches or PHP and MySQL is quite simple – it reduces the number of times a particular file needs to be requested or a specific query needs to be run because files can be requested and stored in memory whilst queries only need to be run once, with the results then stored in memory until requested.
Considering that each time someone visits your homepage, the same queries are being run to display the same content, it makes sense to run these queries just once and then cache the results. MySQL query caching is something that you can configure through the my.cnf file that MySQL server relies on, however this also means that it can only be implemented on a Cloud VM or dedicated server and not shared hosting.
An enhancement for the application itself that you may want to consider is . Even though this is a plugin, it can help to speed up your website by serving static HTML pages as opposed to having process a number of queries and scripts every time someone requests a page. ‘Minifying’ a site is also another tactical measure; the purpose of minifying is to remove any unnecessary elements from CSS and Javascript files, this could include comments or line breaks etc., and can this can go a long way to reducing the size of such files and thus reducing the time it takes to load each one.
Whilst there are many free plugins available for WordPress and in many cases if there is something that you would like to do with WordPress, there’s usually a plugin available for that purpose, quite often these plugins can be poorly written and in situations where the application is having to load lots of extra files each time a single page is loaded then you are going to see performance impacted. Most of the flaws in plugins arise from the overuse of Javascript and some plugins even go as far as including additional Javascript libraries to deliver some of their features. You should review the ratings allotted to plugins before using them so that you are able to identify if there are going to be any issues with them rather than playing Russian roulette and finding that your website grinds to a halt.
In order to make sure that you effectively increase the RAM allocation, you will need to set the following values: