Migrating WordPress website from InMotion Hosting to DigitalOcean

The website unionchurchss.org was hosted on InMotion Hosting. According to https://whois.domaintools.com/unionchurchss.org, there were "344 other sites hosted on this server":

InMotion Hosting shared server

My first step was to use FTP to download WordPress source code and content files hosted on the InMotion Hosting server. I went to my cPanel account at https://secure261.inmotionhosting.com:2083/ to obtain my FTP credentials:

cPanel login screen

This was the first screen after a successful cPanel login:

cPanel first screen

I scrolled down to find the FTP Accounts link:

FTP Accounts link from cPanel

I found the FTP Username Account that I needed to connect to the server using FTP:

FTP Username Account found

The information above does not specify Host nor the password to connect via FTP. But I found the password from my records of when I created the InMotion Hosting account. For the Host value, I could use either (the shared IP address) or secure261.inmotionhosting.com. That was all I needed to connect to the server using FTP via FileZilla:

Connect using FTP via FileZilla

I clicked OK to the Unknown certificate pop-up message:

Unknown certificate FileZilla connection

My WordPress files on the server were displayed under the /unionchurchss.org folder:

WordPress files on server

20406 files were transferred successfully:

Successful transfers

The process resulted in 310 failed transfers:

Successful transfers

All of the failed transfers are from this directory: unionchurchss.org\wp-content\plugins\boldgrid-backup-premium\vendor\google\apiclient-services\src\Google\Service\. I could safely ignore those failed transfers because that was not going to affect what I needed for the functionality of my website.

The 20,406 downloaded files, together have a size of 5.15 GB:

Show size of downloaded files

My next step was to download the MySQL database. From cPanel, I clicked the phpMyAdmin link:

Click phpMyAdmin

That took me to https://secure261.inmotionhosting.com:2083/cpsess9515791293/3rdparty/phpMyAdmin/index.php, where my database was listed as unionc10_wp96857:

Show phpMyAdmin interface

This is the list of tables in the database:

Database list of tables

I clicked the Databases tab and after that, I clicked the database that I wanted to export:

Click database to export

Then I clicked the Export tab:

Export database

I used the Quick - display only the minimal options export method and SQL as the output format. Then I clicked Export:

Final steps to export database

The database was downloaded successfully as a .sql file. Its size was 5.37 MB:

Database downloaded successfully

I visited https://digitalocean.com and from my account, I clicked Create a Team:

Create a Team

I provided the new team information and clicked Continue:

Create new team

A verification link was sent to the email address I provided:

Create a Team

I received a welcome email:

DigitalOcean welcome email

I received a second email with a link to verify my email:

Verify email

Clicking the link to verify my email address took me to the Add Payment Method section, where I provided my credit card information.

Add Payment Method

The last step was optional and I decided to skip it for now:

Invite Members

I was charged $1 as a pre-authorization "hold" charge on my card used to verify my card, which will be released within a day or two:

Invite Members

I visited https://marketplace.digitalocean.com/apps/wordpress and clicked Create WordPress Droplet:

Create WordPress Droplet

I chose Toronto as the Region:

Choose Toronto Region

I scrolled down and in the Choose an image section, I added a MySQL Managed Database for an additional $15.00/month:

Add MySQL Managed Database

I scrolled down and in the CPU options section, I chose Regular Disk type: SSD and $6 /mo | $0.009 /hour (1 GB / 1 CPU | 25 GB SSD Disk | 1000 GB transfer):

Choose Toronto Region

I scrolled down to the Choose Authentication Method section and chose Password - Connect to your Droplet as the "root" user via password, where I created my root password:

Create root password

I enabled backups for an additional $1.20/month because I was going to production, and gave my Droplet an identifying name that I will remember it by: unionchurchss.org. The price will be $22.20/month or $0.033/hour. Finally, I clicked Create Droplet:

Enable backups and create Droplet

It took a few minutes for the new Droplet and MySQL Managed Database to be created. When the creation was completed, I saw both listed as resources:

Droplet and database created successfully

In the Settings section, I updated the project details:

Update project details

Now I see my project with proper descriptions:

Proper project descriptions

Go to the new Droplet and click Graphs. Notice that there is a message about an upgrade available for additional metrics and alerting:

Upgrade for additional metrics and alerting

Without the upgrade, only three metrics are available: Bandwidth, CPU Usage and Disk I/O.

Upgrade for additional metrics and alerting

I used PuTTY to log in to my Droplet:

Log in to Droplet using PuTTY

After clicking Open, this pop-up security alert appeared:

PuTTY Security Alert

I clicked Accept. Then I connected as root:

Login as root

Provide root password to login:

Login as root

This was the initial output after a successful login:

PuTTY output after successful login

Configure domain name and LetsEncrypt to activate HTTPS (part 1 of 3):

Login as root

Configure domain name and LetsEncrypt to activate HTTPS (part 2 of 3):

Login as root

Configure domain name and LetsEncrypt to activate HTTPS (part 3 of 3):

Login as root

I installed and enabled the metrics agent using curl -sSL https://repos.insights.digitalocean.com/install.sh | sudo bash

Install and enable metrics agent

The new metrics Load (1/5/15), Memory and Disk Usage were added.

New metrics part 1 of 3:

New metrics part 1 of 3

New metrics part 2 of 3:

New metrics part 2 of 3

New metrics part 3 of 3:

New metrics part 3 of 3

Use cd /var/www/, adduser unionchurchss, usermod -aG sudo unionchurchss

and chown -R unionchurchss:unionchurchss html to create user, add it to the sudo group, and assign new user as owner of directory where WordPress files are placed:

Add user, sudo group and ownership

I renamed the html directory to htmlBACKUP and created a new html, assigning proper directory owner and group to this new directory that will host the WordPress files.

Prepare HTML directory that will host WordPress files

I connected to FTP from FileZilla using as Host, with the username I created, with port 22.

Successful FTP connection with new user

At this point, /var/www/html/ was empty because that was the new folder I created in the previous steps. I uploaded to /var/www/html/ the WordPress source code and content that I downloaded from InMotion Hosting (the 20,406 files with a total size of 5.15 GB, shown in initial steps of this post):

Empty HTML directory

I do not understand why 20,463 files were transferred. I was expecting a transfer of 20,406 files because that was the number that I had at C:\Users\jmont\Dropbox\unionchurchofsansalvador\unionchurchss.org\inMotionHosting\unionchurchss.org\. A possible explanation that I can think of is that maybe some files were counted more than once when a network error did not allow them to be uploaded, and FileZilla tried again. Maybe there was a bug in the FileZilla counter that made the same file to be counted more than once. I will not worry about it and assume that /var/www/html/ has all 20,406 files that I need, nothing less and nothing more.

Inaccurate FileZilla counter

I had to interrupt the migration process because I encountered incompatibility issues with PHP versions for the website. I needed to think carefully about my upgrade and server migration strategy. But I hope the idea was clear. The next steps on the new server would be to load the MySQL database, complete the Apache configurations, and finally changing the DNS settings for the website and email to point to the new server.

Published: 5:59 AM GMT · Dec 10, 2023