Hello,
Background: I moved my existing live WordPress website from Hostgator to DigitalOcean and now, I’m expecting to see it working with my IP - http://<ip> because I have not yet pointed my domain name yet (nameserver changes) and I don’t want to transfer as well and want to continue using website with http://<ip> inside DigitalOcean.
Problem: Currently, I’m able to open my website home page with IP address, but I’m unable to access /wp-admin or /wp-login.php.
Can someone help me what I could be doing wrong here?
Thank you.
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!
Hi there @suchakmaulik179,
What is the exact error that you see when you try to visit /wp-admin?
I think that you might have to update your WordPress site and home URL to match your Droplet’s IP address so that you don’t get redirected to your domain name.
To do that just add those 2 lines to your wp-config.php file:
define( 'WP_HOME', 'http://your_server_ip_address' );
define( 'WP_SITEURL', 'http://your_server_ip_address' );
Another thing that I could suggest is to make sure that you’ve cleared your WordPress cache in case that you are using any caching plugins.
Another way of testing your site is to use your local hosts file and point your domain name to your Droplet’s IP address. That will affect only your PC and you will be able to fully test the functionality of your website directly via your domain name rather than having to change the site and the home URLs.
The location of the file is as follows:
Windows PC c:/windows/system32/drivers/etc/hosts
Mac and Linux /etc/hosts
Just open it up in your favorite text editor (e.g. Notepad) and add that line on the bottom:
your_server_ip_address yourdomain.com www.yourdomain.com
Once you have made the change, save the file and browse to your website as normal.
You will see it served from your new Droplet and will be able to test the full functionality of your CMS.
To view the site on your existing host, just remove the line from your hosts file.
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.