What would be the best PHP cache modules?

userX

Verified User
Joined
Apr 28, 2020
Messages
24
Greetings!

I am moving from shared cPanel hosting, got my DirectAdmin up and running, PHP 7.4, Centos 7, Apache, and MariaDB 10.4.

Wondering which would be the best PHP cache optimization modules/combinations to add to my server?

From what I have come across, this is what stands out, anything else to be considered?

Redis
PHP-FPM
OPcache
Memcache

Regards
Dennis
 
you can use few, php-fpm + opcache + memcache (some CMS has integrated support)
 
Thank you Zhenyapan

I forgot to mention, it's only for my own Wordpress sites.
 
Welcome to the forum. I would recommend you go slow and learn DA first. I sort of depends on what you want to accomplish.

Is this a new server? what did you have on cpanel?
 
I'm using php-fpm 7.3 + opcache + mariadb 10.3 with innodb preffered - all ok.
 
Thank you, Brent,

Yes, it's a new server, we just got it up and running this week.

Not so much setup differences - more differences by the limitations between shared and your own server.

What do you mean when you say go slow and learn DA, what exactly are you pointing out that needs to pay attention to?

Sorry, but I don't have that luxury to go slowly, therefore I got a service contract, they hardened the server and will monitor it 24/7 and take care of all server maintains, well worth it, I sleep better and I get a stress-free lifestyle!! I do not need to dig into all the details and monitor the server my self 24/7 and can focus on my business.

Accomplish, a bulletproof and top optimized server that isn't eating up resources by using the wrong tools! But I want to know what I am running. Then I can't blame anyone else if my setup is a mess!!

Great minds think alike!

What you guys are running is what I was thinking, I just needed to know from experienced server owners with same setup, what they are using, and what they would recommend.

Are there any special settings for php-fpm and opcache that need to pay attention to or will it run out of the box?
 
Could you please share more info and why redis?
@userX
No sorry while we don't use WP, and for everyone / server it is should be somewhat different what is best.

( also very hard for me to write understandable text)

So look at the Website redis itself and do some reading if for your purposes it could be handy.

Depending on lot of things how much Budget and Memory and CPU and what you really need for your Server / sites.
OPCACHE PHPFPM is the most simple and for hmm more "light" purposes.
 
Thank you, Brent,

What do you mean when you say go slow and learn DA, what exactly are you pointing out that needs to pay attention to?

Sorry, but I don't have that luxury to go slowly, therefore I got a service contract, they hardened the server and will monitor it 24/7 and take care of all server maintains, well worth it, I sleep better and I get a stress-free lifestyle!! I do not need to dig into all the details and monitor the server my self 24/7 and can focus on my business.
No thank you.. You did the correct thing and hired someone. A great many don't do the right thing. Most post because they are trying to do it all themselves. When you could hire a good sysadmin like the ones that help here on the forum.
a bulletproof
Really no such thing as bullet proof. Again you have an Admin so this helps with the bullets.

What you guys are running is what I was thinking, I just needed to know from experienced server owners with same setup, what they are using, and what they would recommend.
It's all malleable. Ask your guy/girl and see their thoughts if you like it keep it. if not have then change it. IT changes weekly. So what is good now might not be good in a few weeks. everyone has an opinion.

Like ikkeben said Redis is good too.
 
Brent, it might be I am too old, too wise not to learn from the mistakes of others or the past and learned long time ago, no one can be everything to everyone!

Yesterday I spent hours reading about the PHP-FPM, OPcache and Memcache. Now looking into Redis.

@userX
OPCACHE PHPFPM is the most simple and for hmm more "light" purposes.
As it is only for my own sites, i was looking into familiar things. I found out Redis has a few WP plugins to make things even faster.

One thing tho I can't find much about, Redis and Apache - while I have a new server, should I change to some other combination to take full advance of Redis?

What would you recommend as the best server set up combination?
 
What would you recommend as the best server set up combination?
I forgot to mention, it's only for my own Wordpress sites.
I use my server only for my own WordPress sites too. I set up server with Apache + Nginx as reverse proxy, PHP-FPM + Opcache. In WordPress installations I have plugin to cache sites into statics HTML files. All my websites works extremely fast.
 
If I had spent a few more days study server cache, I would have graduated with a Master's Degree!


Many great options to choose from...

Apache Ignite
Redis
PHP-FPM
OPcache

After a lot of reading and discussions with my server management team, we ended up using Memcached and PECL Memcached extension.

Mainly as AWS highly recommend Memcached and also, WordPress uses it for its network along with the following plugins.

Memcached Object Cache

Batcache Manager

Extend The Time Batcache Caches your Site


During my search, I came across many nice gems, here is a few of them if your wp sites need some extra....

Some nice goodies here

Amazing plugins by WP Speed Matters


 
Is possible use Memcached on a Apache+Nginx (As RP)? With php 7.4+
Is best use that configuration with PHP as FastCGI or as PHP FPM?
 
Back
Top