Create the Site

In my previous post, I described why I wanted to move my site from GoDaddy to DigitalOcean.

I will describe how I moved an existing site from GoDaddy to DigitalOcean hosting via The steps to install and migrate WordPress content and database to DigitalOcean. Finally, moving the domain name server to DigitalOcean.

The site I am moving is

My helpful screenshot

On my DigitalOcean server I use to manage the server as mentioned in part 1 of this blog.

So login to the account and create a new app called operascoolorg

My helpful screenshot

This creates a new public folder for my new operascoolorg app.

My helpful screenshot

and it is instantly available on the web:

My helpful screenshot

Migrate WordPress Folders

Next, SSH to the apps public directory on the DigitalOcean server. My app is located in apps/operascoolorg/public folder.

Then download the latest Wordpress version using the following:

tar xzf latest.tar.gz
mv wordpress/* .
rm latest.tar.gz
rmdir wordpress

Browsing the sites domain URL will show the WordPress installer:

My helpful screenshot

As I am migrating an existing WordPress site, I am not going to continue with the install.

Now, using Filezilla, download the operascool WordPress files from GoDaddy to a local folder on my Mac.

The only content that I want to keep from the GoDaddy server are in the wp-content folder: a custom theme “wpcartoons” and the uploads folder with the images for the site.

Again using Filezilla, I upload these folders to the wp-content folder on the DigitalOcean server:

My helpful screenshot

Migrate WordPress Database

Going back to, a database is created for the operascoolorg app.

My helpful screenshot

Using my favorite MySQL database software SequelPro, I export the database from GoDaddy and Import to the newly created operascoolorg database.

My helpful screenshot

Whilst still in SequelPro, I need to update the post id’s as they have moved folder location (you may not need to do this):

update wp_posts set guid = replace(guid, '','');

Now we need to update the database credentials in the WordPress config file.

SSH back to to the apps public directory on the DigitalOcean server and type the following:

mv wp-config-sample.php wp-config.php
nano wp-config.php

My helpful screenshot

This will allow me to update the database configuration to that created by ServerPilot.

define('DB_NAME', 'database_name_here');
define('DB_USER', 'username_here');
define('DB_PASSWORD', 'password_here');
define('DB_HOST', 'localhost');

Note that the localhost for my server is Save the file.

Move Domain Name Server to DigitalOcean

Firstly, I will add the domain to my operascoolorg app in

My helpful screenshot

Now to add the DNS to my DigitalOcean server:

My helpful screenshot

and for good practice add the www. CNAME - remembering to put the ending dot in else it won’t work.

My helpful screenshot

Login to the GoDaddy account and go to the Domain settings to manage the Nameservers:

My helpful screenshot

Select Custom and enter the DigitalOcean domain servers:

My helpful screenshot

Wait the usual time for the details to propagate across the world.

Lastly, I synchronise the file from the DigitalOcean server to my local Mac as a backup:

rsync -avP [email protected]:/srv/users/serverpilot/apps/operascoolorg/public/ /Users/Hywel/operascoolorg/public

That is it, for now. In my last post in this series, I will add the site to CloudFlare CDN.

More details on Creating DigitalOcean droplets and accounts can be found at this useful blog by Pascal Becker