Unique WP Cache Name for Redis or Memcached

If you have multiple WordPress websites on your server, enabling cache at the same time will have the same cache name for each of the WordPress installations! It does not matter, which caching engine you use, Redis or Memcached.

In order to prevent the cache from purging on all WordPress websites, when you try or, purge the cache for a single WordPress website, you should define it through the wp-config.php file! You just need to add a constant to the wp-config.php file in the root directory of your WordPress website:

define('WP_CACHE_KEY_SALT', 'hostwave.xyz');

Make sure to replace the string with "hostwave.xyz", you may replace it with your own domain/subdomain of WordPress installation! Remember it, the string should be different for each of the WordPress installations!

Or, you can use WP_REDIS_PREFIX instead of WP_CACHE_KEY_SALT (if you're using Redis caching engine only!)

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to restrict direct root access in Linux

We can do it just in two steps. Step One: At first we will create new root user as follows (for...

How to extract .tar.gz files in Linux/UNIX OS

A tarball is a group of files that are bundled together using the tar command. Use the...

How to add welcome message when SSH start?

You need to change the contents of /etc/motd. Unfortunately, by default, /etc/motd is a link to...

How to change root password when SSH logged in

Run the following command: passwd Now type your new passwordOnce done, retype new passwordDone!...

How to install Pinguzo on any Linux/UNIX OS

Login to Pinguzo panel using Softaculous account or create an account of Pinguzo To add new...