Question

Droplet from Snapshot problem

Posted June 9, 2016 2.5k views
UbuntuWordPressNetworkingBackupsConfiguration Management

Hello!

I recently created a snapshot of my droplet, since i wanted two versions of my website on two different domains.

However, when i go into my new droplets IP, and do / admin, i still end up on my original 46.101.144.192 admin panel, and cannot do changes directly in my copied droplet.

In other words, why is my ‘new’ droplet from a snapshot redirecting me to my 'old’ droplet whenever i try to login as admin to it?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers

That’s not possible. Are you sure you’re using the correct IP? How are you verifying that the changes are being done?

  • I believe the answer here is that my wordpress configuration redirects to a custom URL, which means that this one will as well whenever i try to go to /admin, since they share those properties.

    Any suggestion on how to fix that?

    • The redirecting issue is fixed. However, i can not login to the new droplet using the same credentials as the original site. Any tips on how to add an admin to my wordpress on my new droplet?

      • Hi,

        If you restored a snapshot, the data is going to be the same on that snapshot as when you took it on the original droplet. So the admin/username password is the same. If you do not remember the original password, I would use wp-cli as explained here

Hello Zimpstar, I am having the same redirection issue, can you tell me how you solved it ?

I changed the url in wp-config, and function via ftp but still nothing changes, i can’t login to wp admin and phpmyadmin since i am redirected to the old one.

Hi all,

I also ran into this problem while transferring a snapshot of a WordPress site. It looks like WordPress will redirect to whatever URL is specified in the “home” WordPress option if you move the site onto another URL. Here’s how I resolved this:

First, make sure that this is actually the problem. Run:

$ curl -I mynewsite.com

HTTP/1.1 301 Moved Permanently
Date: Thu, 17 Oct 2019 23:40:29 GMT
Server: Apache/2.4.29 (Ubuntu)
X-Redirect-By: WordPress
Location: http://myoldsite.com/
Content-Type: text/html; charset=UTF-8

The line “X-Redirect-By: WordPress” means that we’re actually hitting the right server, and WordPress is bouncing us back to the old URL.

To fix this, log into your new site via SSH (this won’t be redirected by WordPress). Then log into mysql with your root account and fix the “home” and “siteurl” WordPress options:

$ mysql -u root -p
> update wordpress.wp_options set option_value='http://mynewsite.com' where option_name='home';
> update wordpress.wp_options set option_value='http://mynewsite.com' where option_name='siteurl';

Finally, you’re going to need to clear your browser cache or it will keep redirecting to the old site. On Firefox you just run “Clear Recent History” and select “Cache” to do this.

Submit an Answer