Hello,
I moved my WordPres site from Digital Ocean. I need to access the Digital Ocean version of the site to transfer some additional data (Subscribers). I already changed the DNS.
So, is there a temporary URL I can use? Something like, stagingtiste.domain.com/mydomain/ Or something using the IP? http://xx.xx.xx/~username?
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,
To access your DigitalOcean version of the site after changing the DNS, you can use one of the following methods:
Droplet IP Address: You can simply use the IP address of your Digital Ocean droplet to access the site. This would look something like:
http://xx.xx.xx.xx/
Replace xx.xx.xx.xx with the actual IP address of your Droplet.
Using /etc/hosts on Your Laptop: Another approach is to modify the /etc/hosts file on your computer to temporarily point your domain back to the DigitalOcean Droplet’s IP address. This will trick your laptop into skipping the DNS lookup and load your domain directly from the specified IP in the hosts file. Here’s how you can do that:
Open a terminal on your computer.
Edit the /etc/hosts file. On most systems, you can use a command like:
sudo nano /etc/hosts
Add a line at the bottom of the file with the format:
DROPLET_IP_ADDRESS yourdomain.com www.yourdomain.com
Replace DROPLET_IP_ADDRESS with your Digital Ocean droplet’s IP address and yourdomain.com with your actual domain.
Now, when you visit your domain on your computer, it will load from the Digital Ocean droplet, but this change will only be local to your computer.
On Windows, the hosts file is located in the C:\Windows\System32\drivers\etc folder.
Remember to remove or comment out the entry in the /etc/hosts file once you’re done to ensure you access the live site in the future.
Hope this helps!
Best,
Bobby
Heya,
If you’ve already updated the DNS for your domain to point to a new host and you need to access your WordPress site on DigitalOcean, you can use the DigitalOcean Droplet’s IP address directly. However, there are some considerations and steps to take:
Direct IP Access:
http://xx.xx.xx.xx. However, if you’re using virtual hosts (which is often the case if using server software like Apache or Nginx), this might not work directly since the server identifies the site based on the domain name.Hosts File: The most reliable method to access your old site without affecting anyone else is to modify the hosts file on your computer. This file allows you to override DNS for specific domains:
C:\Windows\System32\drivers\etc\hosts./etc/hosts.Open this file with administrative/root privileges in a text editor. Add a line at the end:
xx.xx.xx.xx yourdomain.com www.yourdomain.com
Replace xx.xx.xx.xx with your DigitalOcean Droplet’s IP and yourdomain.com with your actual domain. Save the file and then try accessing yourdomain.com in your browser. It should load from your DigitalOcean server.
Remember, if you’re using the hosts file method, don’t forget to revert the changes after you’re done to ensure you’re accessing the live site and not the old version on DigitalOcean.
Heya,
You can use the droplet IP address or modify your local hosts file as mentioned. A similar question was asked before in our community which you can check here:
https://www.digitalocean.com/community/questions/website-preview
Hope that this helps!
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.