How to Enable Redis or Memcache on CPanel Shared Hosting

How to Enable Redis or Memcache on CPanel Shared Hosting

How to enable redis on cpanel shared hosting

What is Redis and What is Memcache?

Before we dive into the tutorial, let’s quickly understand what Redis and Memcache are.

Redis (Remote Dictionary Server) is an in-memory data store that can be used as a database, message broker, and more. It’s known for its high performance, low latency, and ability to handle large amounts of data.

Memcache, on the other hand, is a high-performance caching system that stores frequently accessed data in RAM (Random Access Memory). This allows your website to quickly retrieve data without having to query the database, resulting in faster page loads.

How Can Redis and Memcache Boost Website Performance?

Both Redis and Memcache can significantly improve your website’s performance by:

  • Reducing database queries: By storing frequently accessed data in RAM, Redis and Memcache reduce the number of database queries, resulting in faster page loads.
  • Improving response times: By storing data in RAM, Redis and Memcache can retrieve data much faster than traditional disk-based storage.
  • Increasing scalability: By offloading database queries, Redis and Memcache enable your website to handle more traffic and users.

Note: Can I Use Redis or Memcache on any CPanel Hosting?

The simple answer is NO. Very rare to find a cpanel shared hosting provider that having Redis & Memcached built into their packages. In order to support both caching mechanisms, it will require high amount of server resources and extra configurations on the server side. In short, in order to make the Redis/Memcached works for your website, there’re 2 Important items that must be supported by the hosting, typically, the cache module and the php extension:

  1. The cPanel MUST have Redis/Memcached module installed.
  2. The cPanel MUST have redis/memcache/memcached php extension installed.

Most cpanel hosting providers have the redis/memcache php extension installed, BUT they don’t have the Redis/Memcached module installed & configured, thus redis/memcache caching will not work.

A-1. Enabling Redis Module on CPanel Shared Hosting

To enable and start the Redis Module on CPanel shared hosting, follow these steps:

1. Log in to your CPanel account.
2. Scroll down to the “Software” section and click on “Redis Icon”.
3. Click on the “Start” button to start the redis db process.
4. Once started, use the generated redis login in your web configuration.

redis on shared hosting

start redis module on cpanel

cpanel redis module setup

A-2. Enabling Redis PHP Extension on CPanel Shared Hosting

To enable Redis on CPanel shared hosting, follow these steps:

1. Log in to your CPanel account.
2. Scroll down to the “Software” section and click on “Select PHP Version”.
3. Click on the “Extensions” tab.
4. Search for “Redis” and tick the checkbox next to it.
5. Wait for the installation to complete.

 

memcache on cpanel

Enable redis & memcache on cpanel php extension

B-1. Enabling Memcached Module on CPanel Shared Hosting

To enable Memcached on CPanel shared hosting, follow these steps:

1. Log in to your CPanel account.
2. Scroll down to the “Software” section and click on “Memcached Icon”.
3. Click on the “Start” button to start the memcache process.
4. Use the memcached socks details in your web configuration.

memcached-cpanel-module

B-2. Enabling Memcached PHP Extension on CPanel Shared Hosting

To enable Memcached on CPanel shared hosting, follow these steps:

1. Log in to your CPanel account.
2. Scroll down to the “Software” section and click on “Select PHP Version”.
3. Click on the “Extensions” tab.
4. Search for “Memcached” & “memcache” and tick the checkbox next to them.
5. Wait for the installation to complete.

C. How to use Redis with Litespeed Cache Plugin on WordPress?

To use Redis with Litespeed Cache plugin on WordPress, follow these steps:

1. Install and activate the Litespeed Cache plugin.
2. Go to the plugin’s settings page and click on the “Object Cache” tab.
3. Switch “ON” the Object Cache module.
4. Select “Redis” as the cache storage engine.
5. Enter the Redis details (host, port, password) Default port: 6379.
6. Save the changes and refresh the page.
7. Ensure the Status indicator: Redis = Enabled, Connection = Passed.

redis litespeed settings

D. How to use Memcache with Litespeed Cache Plugin on WordPress?

To use Memcache with Litespeed Cache plugin on WordPress, follow these steps:

1. Install and activate the Litespeed Cache plugin.
2. Go to the plugin’s settings page and click on the “Object Cache” tab.
3. Switch “ON” the Object Cache module.
4. Select “Memcached” as the cache storage engine.
5. Enter the Memcached server details (host/socks path, port) Default port: 11211.
6. Save the changes and refresh the page.
7. Ensure the Status indicator: Memcached = Enabled, Connection = Passed.

memcache litespeed settings

Bonus of Having a Redis/Memcached Enabled on CPanel Shared Hosting

By enabling Redis or Memcached on your CPanel shared hosting, you can significantly improve your website’s performance, scalability, and response times. With Litespeed Cache plugin, you can easily integrate Redis or Memcached with your WordPress website, resulting in faster page loads and improved user experience.

Redis Shared Hosting Malaysia

The benefits of having Redis or Memcached enabled on CPanel shared hosting include:

  • Improved website performance and speed
  • Increased scalability and ability to handle more traffic
  • Reduced database queries and server load
  • Improved user experience and search engine rankings

By following this tutorial, you can easily enable and use Redis or Memcached on your CPanel shared hosting, resulting in a faster, more scalable, and more reliable website.

We understand that it’s very hard to find any cPanel shared hosting packages that offering this caching combo, but worry not! We have this awesome combo for you here at eWallz! Head over to our Web Hosting section to learn more.

Share this post


Open chat
Powered by