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.
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