fixed multiple wp redis
Fixed an issue when multiple WP installation have redis enabled causing an unexpected behavior like wrong redirections.
This commit is contained in:
parent
b26520b33f
commit
d52f0fe866
|
@ -393,6 +393,10 @@ _EOF_
|
|||
sudo sed -i "/'LOGGED_IN_SALT'/c \define('LOGGED_IN_SALT', '$SALT_LOGGS');" /var/www/$domain/wp-config.php
|
||||
sudo sed -i "/'NONCE_SALT'/c \define('NONCE_SALT', '$SALT_NONCS');" /var/www/$domain/wp-config.php
|
||||
|
||||
# Redis Conf
|
||||
sudo sed -i "/stop editing/i \define('WP_REDIS_SELECTIVE_FLUSH', true);" /var/www/$domain/wp-config.php
|
||||
sudo sed -i "/stop editing/i \define('WP_CACHE_KEY_SALT', 'redis_object_cache_for_wp_$domain);" /var/www/$domain/wp-config.php
|
||||
|
||||
# Multisite wp-config
|
||||
if [[ "$type" == "-wpsubdir" || "$type" == "-wpsubdom" ]]; then
|
||||
sudo sed -i "/stop editing/i \define('WP_ALLOW_MULTISITE', true);" /var/www/$domain/wp-config.php
|
||||
|
|
|
@ -152,7 +152,7 @@ elif [[ "$domain" == "-delete-all" && -z "$type" && -z "$cache" ]]; then
|
|||
for site in "/etc/nginx/sites-available"/*
|
||||
do
|
||||
domi=$(echo $site | cut -f 5 -d "/")
|
||||
[[ $domi != "html" && $domi != "default" && $domi != $(conf_read tools-port) ]]; then
|
||||
if [[ $domi != "html" && $domi != "default" && $domi != $(conf_read tools-port) ]]; then
|
||||
echo "${gre}Your site ${blu}${domi}${gre} has been successfully deleted! ${end}"
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue