By osoisi
I am planning on migrating my WordPress hosting from GoDaddy to a WordPress droplet using the same domain name. I want to minimize downtime. How best do I do this?
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!
Hello @osoisi,
This is quite easy to do, You can move your website on Digitalocean with any 1ms downtime. The first thing you have to do, Create a Droplet and Install either LEMP or LAMP whatever you like.
You can go here and collect the information about LAMP: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04
Follow all the steps according to guide, but one thing you have to change is Virtual host configuration if you want to run a WordPress website.
You can make the configuration like this:
Replace example.com with your own domain.
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias www.example.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/html/example.com/public_html
<Directory /var/www/html/example.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Log file locations
LogLevel warn
ErrorLog /var/www/html/example.com/log/error.log
CustomLog /var/www/html/example.com/log/access.log combined
</VirtualHost>
Next, take a back up of your Database and Public_html directory. Upload public_html directory here: /var/www/html/example.com/
To manage the Database you can use Phpmyadmin: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-18-04
Upload your Database and connect with your website, Now you’re ready to live your website on digital ocean server.
Point your Domain to Droplet public IP.
If you’ll set up digital ocean DNS, then it may take some time to live.
Hi there @osoisi,
The process that you need to follow is:
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04
Or you could use the 1-Click installation here:
https://marketplace.digitalocean.com/apps/wordpress
After that, you need to backup your Wordpress files and Database from your GoDaddy account
Then using SFTP or SSH upload your Wordpress files and database to your DigitalOcean Droplet.
If you are using the 1-Click installation, you can delete the files from the /var/www/html folder and upload your files from GoDaddy to that folder.
Then you would have to create a new database and a username and import your Wordpress database that you’ve backed up from your GoDaddy account
After that make sure to update your wp-config file with the new database details
Then in order to avoid any downtime, you can test your site on your Droplet. To do that you can edit the hosts file on your PC to bypass the DNS lookup and access the site on our servers through your main domain.
This only affects your computer and your visitors will see the site as normal.
The location of the file is as follows:
C:/windows/system32/drivers/etc/hosts
/etc/hosts
/etc/hosts
Just open it up in your favorite text editor (e.g. Notepad) and add that line on the bottom:
- server_ip_address yourdomain.com www.yourdomain.com
Once you have made the change, save the file and browse to your website as normal. Make sure to clear the cache of your browser.
You will see it served from your DigitalOcean Droplet and will be able to test the full functionality of your CMS before actually pointing your domain name to your DigitalOcean Droplet.
To view the site on your existing host, just remove the line from your hosts file.
So to summarize:
Let me know if you have any questions. 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.