Magento sends me to original IP after server migration

Could you help me what could be problem: As I mentioned, I use also digitalocean.
I made a new droplet to create a staging magento server for test.
So, I created a new droplet and I choose from exist snapshot. Droplet was successfully created with a new IP address, but when I try this new IP with staging droplet this IP forward to the original IP.
SSH is works, I can login with the new IP, just I have problem with only web browser.
As a matter of fact, after I see this problem I login to SSH with new IP and I set the apache2.conf and restart too but problem is same.

After migrating an instance of Magento (via any method) you have to edit the Magento Database. You see, the migrated version of Magento will still be setup to work with the Original IP or Domain name (whatever you had the Base URLs set to).

So, post migration you need to go into the database and amend those URLs. Checkout this Chapter 6 of How to migrate Magento 2 from one server to another. It’s about the last 5 minutes of the video.

Just to clarify, the Server Configuration will be fine - No need to touch it. It’s simply Magento rerouting your browser request.

1 Like

Hi @digitalstartup

Thank you for your answer. It is works. I am so happy to solve this problem too.
To tell the truth, I haven’t notice this tutorial video.
Should I change the new IP in the clone droplet in apache conf or can I leave the old IP?
Matters someting?

Fantastic :+1:

Yes, it would probably be wise to update the apache configuration.

Thank you so much Craig. You are a talent.

1 Like