It is becoming more and more common to migrate WordPress to Digital Ocean. The main reason for this migration is the generic slowness of WordPress with shared hosting. In shared hosting, you do not have to worry about anything except what is inside WordPress. However, the site loads slower than required, and hence, customer satisfaction is hampered.
Cloud Hosting, like Digital Ocean, helps in faster site loading. Hosting a website on Digital Ocean is advantageous since it is cheaper than AWS or GCP, is scalable, fast, and has all the features of a good hosting cloud.
This guide will provide you with 5 different steps on How To Deploy a Local WordPress to the Digital Ocean. The guide will descriptively show you how to move a website as big as 3 GB to Digital Ocean in less than 15 minutes. You will learn about the most convenient tricks to Migrate a WordPress site to the digital ocean. The guide briefly describes the process and wherever extra information is required to Migrate the WordPress site to the digital ocean, links have been provided for your ease.
To migrate WordPress to Digital Ocean, there are some preliminary conditions and steps to be covered, before beginning the process. Hosting a website on Digital Ocean can be very easy if all of the tools required to know how to deploy a local WordPress to Digital Ocean are already present.
Following these steps will make it super easy for you to Migrate wordpress site to digitalocean. All of the required applications and tools on How to move a 3 GB WordPress site to Digital Ocean in less than 15 minutes are provided below.
Apps & Tools needed:
A few tips on what information do I need to migrate my website before we start:
- If you want to migrate an old website then you can easily do this using Digital Ocean on cloudways.com
- If you’re changing hosts but keep the same domain name, reduce the TTL of your domain name at your registrar before you start. This will probably speed up DNS propagation.
- Your ISP might also be a bottleneck in DNS propagation. I had to wait for hours before my ISP finally updated their DNS, so I switched to Google DNS. It’s very simple and much faster.
- Backup everything – make sure there’s a way to go back if everything goes wrong while you try to Migrate wordpress site to digitalocean.
- Clean up your WordPress installation before you begin. Update all themes and plugins and remove the ones you don’t use.
- Disable any caching plugins you have installed and put your side in maintenance mode if you want.
Step 1: Export Your Database
This step will cover the way on How to Export Website to a New Host. In order to export a website to a new host, start with the following step!
Export your current database via CPanel, PHPMyAdmin, or a plugin. I used WP Migrate DB and it worked like charm.
(You can change your DNS now so you don’t have to wait for DNS propagation later on.)
To migrate WordPress to Digital Ocean, Cloudways WordPress migratory from local servers can also be used. More information on this is available on How to Use Cloudways WordPress Migrator Plugin.
Step 2: Create An App + Database
This is a vital step in order to Migrate wordpress site to digitalocean.
Login to ServerPilot and create a new app for your website.
Create a database on your new server with the same name, user, and password as the one on your current server. You can copy these details from your wp-config.php file.
Step 3: Move All Files And Folders To Your New Host
This is what usually takes up the most time. Especially if you have to FTP everything to your local machine first.
If you have SSH access to your current host your lucky: you can use SCP to transfer all files from one host to another.
More info on the syntax here: https://www.garron.me/en/articles/scp.html
I logged in to my current WP host and used the following command to move my entire WordPress install (3GB) to Digital Ocean in 148.9 seconds.
scp -vrC /home/user/domain/* [email protected]:/srv/users/serverpilot/apps/myapp/public/
Step 4: Import Your Database
I installed Adminer to import my database. It’s a single PHP file that you have to upload to your server – no installation required.
Don’t forget to download your wp-config.php file from your new server and make sure all constants are accurate. In my case, I had to change the DB_HOST to localhost.
Step 5: Update Your DNS
If you haven’t done this in step 1, change your DNS to your new server.
Many thanks to all developers who made this possible.