Wordpress w3total cache: disk, Opcache or memcache

I have a WordPress site that has about 200,000 page views every day. I am running this on a VPS with 6GB of RAM. I already have w3total cache installed, but the page still loads slowly.

Now I am wondering which cache should I use for my Disk, Opcache or memcache site and should I use it on alla or how should I configure it? I am currently only using the main disk cache.

My question is basically, should I change anything, and if so, why? or should I just stick with basic disk caching as it is?

I haven't tried to change anything yet, so I don't make it any worse as I'm completely unsure.

+3


source to share


1 answer


The answer to this question is 7 years old, so I'll update the answer. Please note that I am assuming you are using W3TC for your site.

Disk cache

Disk cache can usually be used for a low / medium traffic website. One problem with a high traffic site is that the Disk Cache gets corrupted if you use it with the object cache and the database cache.

For a medium / high traffic website running on a single server, I would recommend the following:

  • Page Cache: Use Extended Disk Cache
  • Object cache: use Memcached
  • Database cache: use Memcached

OPcache

OPcache stores the compiled PHP code in memory and will certainly increase the speed of your code execution.

It is important to understand that OPcache is a PHP code cache and does not store any pages, queries, or database objects.



You can read more about OPcache here:

https://www.sitepoint.com/understanding-opcache/

Memcached

Memcache stores data in RAM as key-value pairs and definitely improves the speed of a website, as memory access is much faster than hard disk access.

Note that MemCached will significantly increase your memory usage, so it's worth trying different configurations in a test environment.

You can read more information on how to install Memcached on Linux Server here: https://easyengine.io/tutorials/php/memcache/

Hope this helps :)

+2


source







All Articles