A slow database is the most common reason a site drags on shared hosting. An in-memory cache takes most of the load off MySQL, and ISPmanager 6 can install Redis and Memcached in a couple of clicks. Here is how they differ and how to connect them.
How Redis differs from Memcached
| Parameter | Redis | Memcached |
|---|---|---|
| Data types | Strings, lists, hashes, sets | Strings only |
| Disk persistence | Available, optional | None, memory only |
| Typical use | Object cache, queues, sessions | Simple page and fragment cache |
For WordPress and most CMS platforms, Redis is the better fit: it survives a process restart when disk persistence is enabled, and it is easier to use for task queues.
Installing Redis through the panel
Open "Settings" → "Features", find Redis, and click "Install". ISPmanager 6 adds the service to autostart on its own and opens the socket only for local connections on port 6379.
You can check that the service is running from the server console:
systemctl status redis
redis-cli ping
The redis-cli ping command should return PONG, which means the service accepts connections.
Installing Memcached through the panel
Memcached is installed the same way: "Settings" → "Features" → Memcached → "Install". By default the service listens on port 11211 and limits the amount of cache memory, usually 64 MB per site — you can raise the value in the module settings if you have a large number of cache objects.
systemctl status memcached
echo stats | nc 127.0.0.1 11211
The echo stats command shows the number of stored keys and the cache hit rate, which tells you whether the cache is actually reducing the load on the database.
Connecting the cache to WordPress
For Redis, install the Redis Object Cache plugin and set the host to 127.0.0.1 and the port to 6379 in its settings — the plugin creates the object-cache.php file in the wp-content directory on its own. For Memcached, the W3 Total Cache plugin works well with the Object Cache module enabled and the address set to 127.0.0.1:11211.
After connecting any cache, check that the site opens the admin pages without errors: a wrong port or a socket blocked by the firewall leads to a blank white screen instead of a clear error message.
Cache after migrating or cloning a site
If the site was moved to another server, the old cache keys will still point to the previous data — be sure to flush Redis or Memcached right after the migration, otherwise the client will see stale content. The migration procedure is covered in the article about migrating a site between servers with ISPmanager 6.
You can flush the Redis cache from the console with:
redis-cli FLUSHALL
Summary: how to choose and verify the cache
- Choose Redis for WordPress and CMS platforms with cacheable objects
- Memcached is enough for a simple page fragment cache
- Install the service through "Settings" → "Features", not through third-party repositories
- Check status with systemctl status and ping the service from the console
- Flush the cache after migrating a site or changing its domain
If server resources are still not enough even with caching, it may be time to reconsider the VDS plan — more on ISPmanager 6 license types and server capacity is in the article about ISPmanager 6 license types.