Digital Ocean Wordpress One Click Install - How can we change the domain name once initial setup has been done

Digital Ocean WordPress One Click Install - How can we change the domain name once initial setup has been done?

While initial setup - used different domain name just to set and test site. once, all done - how can we update the domain name. tried to update sit…

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello @er.tejaspatel88,

In order to make that change, there are a couple of things that you need to change:

  • First login to your WordPress admin panel, then go to Settings -> General and change your WordPress Address (URL) and your Site Address (URL) to your new domain name. Finally, save the changes.

  • Then you need to SSH to your Droplet and change your Apache Virtual Host:

  1. sudo nano /etc/apache2/sites-enabled/000-default.conf

In that file change the ServerName and the ServerAlias with your new domain name.

After that save the file and restart Apache in order for that change to take effect:

  1. sudo systemctl restart apache2

Hope that this helps! Regards, Bobby