Problem with REDIS Cache

Hello Everyone,

on Digital Ocean I created a new droplet (Droplet A), I have installed Magento 2.3, added REDIS cache, following instruction from digitalstartup.co.uk and I took a snapshot. All working fine.

I created (Droplet B) from the above snapshot but when in my web browser I digit the IP of Droplet B I’m redirected to Droplet A.

I can connect to Droplet B with SSH and I tried to flush the magento cache with following commands:
in /var/www/html/

bin/magento cache:clean
bin/magento cache:flush
I also tried to clear REDIS cache using following command (is it correct?):
redis-cli -a myredispassword flushall

All above action did not have success. I’m still redirected to droplet A.

Thank you for your help.

MAX

I don’t think this has anything to do with Redis. Did you remember to update your Base URLs in your Database? If you don’t update this and clear your Magento Cache then you’ll always be redirected to the Domain/IP that was previously set.

Ref: How to migrate Magento 2 from one server to another (Chapter 6)

Hi Craig,
yes you are right, this has nothing to do with REDIS. It is a problem related to the update of the Base URLs in magento Database.

I could fix it doing the following:

cd /var/www/html
php bin/magento setup:store-config:set --base-url="http://new-droplet-ip"
php bin/magento setup:store-config:set --base-url-secure="https://new-droplet-ip"
php bin/magento cache:flush

Thank you for your help
MAX