Report this

What is the reason for this report?

Migrating existing WordPress site - unable to login

Posted on June 17, 2020

I’m attempting to migrate an existing WordPress site to DigitalOcean. I’ve successfully set up the basic WordPress site, and can access the generic site via the IP address. However, when I try to access the wp-admin so that I can import the XML (http://##.##.##.##/wp-admin/) it redirects to the existing site’s login.

So, how can I access the Admin section? Thank you in advance for your help.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hello, @tomraymond

You can temporary alter your hosts file on your PC in order to access the site from your DigitalOcean’s droplet. In this way you can access the site directly using the domain name and you wont be redirected.

The file is located here:

For Windows c:/windows/system32/drivers/etc/hosts

For Mac /private/etc/hosts

Linux machines /etc/hosts

Open the file and add this line:

IP Address example.com www.example.com

Note: Replace IP Address with your actual droplet IP address

Once the change is made, save the file and visit the site again.

Hope this helps!

Regards, Alex

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.