LAMP server optimization (caching, OPCache, MySQL DB) for Wordpress / Buddypress network
At peak times there are up to 150 members online at the same time. We want to get to several hundreds.
This platform is based on Wordpress and a Buddyboss / Buddypress plugins. The site is internationalized using WPML and offers the possibility of paid memberships using PMPro and various complementary addons.
GOAL of the assignment is to analyze possible optimization potentials. First and foremost the use of the server possibilities, i.e. analysis of possible bottleneck(s) and tweaking of the corresponding available server parameters for [login to view URL], MySQL server, Apache etc., so that an optimal use of the possibly still free resources can be achieved. E.g. a huge amount of RAM is still free -> mysql query caching possible?
Since the site is highly dynamic (activity feed, comments, groups and forums, messaging between members), complete caching is difficult to implement.
We have already exhausted some possibilities for optimization:
* Caching of some repetitive and "expensive" (i.e. slow) queries using static variables and using Wordpress transients.
* Caching of various HTML widgets that don't need to update themselves all the time
* Deletion of outdated transients, purging and cleaning of old DB entries and logs
* Rewriting of plugins to avoid SQL queries within for loops, for example
* Memcached and OPCache PHP Extensions were installed
* Update to PHP 8 because of JIT still in consideration
* Wordpress Plugin: Query Monitor -> analysis of results
The site is still quite slow, but only during peak times and only "in waves".
It is currently unknown what the bottleneck is, is it PHP or MySQL. In Linux "htop" both are alternating top loaders.
We have ~50GB of RAM, of which only 5GB is in use. Unfortunately the server does NOT have Plesk or the like, only a proprietary interface with the following options:
PHP FPM / CLI:
If the analysis results are code optimizations, these may need to be implemented in consultation and depending on the effort involved. At first, analysis + implementation for the parameters of the LAMP settings.