Report this

What is the reason for this report?

Setting up domain with WordPress

Posted on July 31, 2019

Hey,

Looking at DigitalOcean for hosting my WP Site. It’s the cheapest but I am a bit of a noob so sorry if this is a really dumb question.

Once I’ve migrated my site, and it’s on the IP I get for my droplet and I am ready to go live and switch hosts. I then go into networking, put it in, and then put the details in on my website etc.

Do I just set the WordPress Address (URL) and Site Address (URL), to my domain and it should work from there?

Thanks



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,

Before making the DNS change I would recommend testing your website with your hosts file.

You can edit the hosts file on your PC to bypass the DNS lookup and access the site on your Digital Ocean server through your main domain rather than the droplet’s IP address.

This only affects your PC and visitors to your website will see the site as normal.

The location of the file is as follows:

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

Mac OSX /private/etc/hosts

Linux /etc/hosts

Just open it up in your favorite text editor (e.g. Notepad) and add that line on the bottom:

Your.Droplets.IP.Address yourdomain.com www.yourdomain.com

Make sure tho change the Your.Droplets.IP.Address with the actual IP address of the droplet and the yourdomain.com part with your actual domain

Once you have made the change, save the file then clear your browsers’ cache and browse to your website as normal.

You will see it served from our systems and will be able to test the full functionality of your Wordpress site.

To view the site on your existing host, just remove the line from your hosts file. If everything is working as normal, then you can proceed with the DNS change and point your domain to the Droplet’s IP address.

Also I would recommend following this step by step guide on the Digital Ocean website on how to migration your website with zero downtime:

https://www.digitalocean.com/community/tutorials/how-to-migrate-wordpress-from-shared-hosting-to-a-cloud-server-with-zero-downtime

Let me know if you have any questions. Bobby

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.