How do I enable/disable Xcache via cPanel – CloudLinux

It’s very simple to mange PHP directives on a CloudLinux server as we’ve PHP selector on it. We already summarized this on the topic >> Introduction to CageFS and PHP Selector << We can simply manage this through cPanel >> Software/Services >> Select PHP Version.

Here I’m explaining the steps to enable/disable “Xcache” via cPanel for a particular account. The following directives must be there in “/etc/cl.selector/php.conf” file on the server to manage this feature via cPanel. Directives are:

xcache.cacher     on/Off
xcache.size       --value--
xcache.stat       on/Off

Oops! those directives aren’t there on my cPanel. Yeah that means the above directive are missing in “/etc/cl.selector/php.conf” file.
Add the following directives in “/etc/cl.selector/php.conf.”

Directive = xcache.cacher
Default   = On
Type      = bool
Comment   = Enable or disable opcode cacher. Not available if xcache.size is 0.
Directive = xcache.size
Default   = 50M
Type      = value
Range     = 0 50M 100M
Comment   = Total amount of memory used for opcode (*.php) caching. If set to 0 - opcode caching is disabled.
Directive = xcache.stat
Default   = On
Type      = bool
Comment   = Do stat() to check if xcache setting updated.

Xcache

That’s it. No need to restart any services. Go to cPanel and check!

Related:

1, The XCache – Simple way to install Xcache from source code.
2, CloudLinux installation.

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

Leave a Reply

Your email address will not be published. Required fields are marked *