• Resolved Scott Farrell

    (@sfarrell5123)


    it seems your logic uses $table_prefix if its enabled.

    So you understand, there can me multiple wp installs on one server. but, by the same logic, you should also index off the database name. so perhaps $db_name_$table_prefix – know it makes the key longer, but it is far safer.

    as if 2 wp installs, have the same table_prefix, but a different db, they will clash. The default for table_prefix is wp_ , and I have several clients that use table_prefix wp_ but a different db.

    I can manually add the salt via wp-config.php – I know that – but its error prone.

    It makes no logical sense to use table_prefix in isolation to dbname

    perhaps though, I am wrong, and you have another method if there are multiple installs, seperate mysql databases. Like on a cpanel server.

    https://ww.wp.xz.cn/plugins/redis-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Mhhh, I get your point.

    For standard setups I recommend using a separate Redis database for each WordPress installation. Why would they conflict exactly?

    Thread Starter Scott Farrell

    (@sfarrell5123)

    if they are in different redis databases, that should be fine. But you need to set that manually, per wp install.

    if you have dozens/hundreds of wp installs, managing anything by hand – is too easy to break. If some thing wrong, and 2 installs end up talking to the same object cache, I’d assume they both get smashed, and need to recover the mysql database from backup.

    what is the downside of my idea – just adding the database name into the salt – along with the table_prefix ? it’s the smallest amount of code, safe, fast – only downside is a slightly larger key.

    do you have another idea ? that isnt manual , that scales to hundres/thousands of wp installs ?

    Plugin Author Till Krüss

    (@tillkruess)

    Someone had requested this feature before, with the same argument, but the PR was rejected.

    IMO object caching should be setup on a per site basis, when it’s needed, and installations should not share databases.

    I’d recommend you add some kind of automated script to your hosting environment to configure new installations properly.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘salt should include database’ is closed to new replies.