Migrating WordPress site from GoDaddy managed WP hosting to DigitalOcean droplet.

Anton Chernysh
DevOops World … and the Universe
4 min readMar 22, 2018

Before you start reading this I'd like to warn you, there wont be anything outstanding in this article, don't expect to discover new cool tools for WP site migrations. Nope! I just want this article to be another guide for first-timers and also shed some light on little gotchas you might (and you will) face when migrating your site away from GoDaddy managed WP hosting.

W.H.Y.?

What Hosting is Yours.
Or why do we want to migrate from this brilliant solution.

The reason why we migrated was basically generic slowness of WordPress site running on GoDaddy managed hosting. We had our domain covered with CloudFlare security features + CDN, sometimes we could see only CloudFlare cached version of our site, multiple times site operators reported it's being extremally slow.

Above said doesn't mean I'm against WP managed hosting, in our case it just wasn't working the way customer wanted it to work.

In general for WP hosting I'd recommend a couple of solutions, depending on how much load your site needs survive, how often it's updated, and so on…

  • Heavy load:
    I would say go for AWS Autoscaling group, RDS, + memched. Hide everything behing WEB application firewall attached to Application Load Balancer:

Of course here you can use your favorite cloud provider, you can run all this in containerized infrastructure and experiment in infinite loop.

  • Low or Medium Load:
    Use either Managed WordPress hosting or dedicated servers (VPS) or even ordinary cheap hosting you can buy from your local provider. Good thing about managed WP hosting is you don't have to care about anything except your WP from inside. I'd say this is the best way to go but sadly not in our case, therefore let's proceed to How-To.

Getting target platform ready

If you don't want to move content and just setting up a fresh WP installation, you can use One-Click application. Go to Create -> Droplet -> One Click applications and select WordPress:

For our migration we can do the same to make sure all component required to run WP are installed on this droplet.
Then choose a size and nearest data center to run your server (droplet). Here you can also enable backups (for extra $), add your SSH keys, once done just hit "Create". Go get a cup of coffee and your WordPress site is up and running.

First thing I did with this brand new shiny WordPress was I deleted it, just because I replaced everything with my own WP files later.

Backing up GoDaddy website.

  1. Go to "My Products" -> "Managed WordPress" -> Select your site and hit "Manage". On a right "setting" pane get your SFTP credentials.
  2. Connect to your host with your favorite FTP client (Mine is FileZilla) and download WordPress files to your local machine. This might take a while, so go get another coffee, play with kids, or just watch cat-images (there are quite a few over internet).

Backing up your database

  1. Go to “My Products” -> “Managed WordPress” -> Select your site and hit “Manage”. On a right “setting” pane get your database connection details and PHP my admin address. Go to phpMyAdmin URL -> Export -> Select your DB in databases list and make sure you have everything just like on my screenshot and export your DB content to SQL file.

Moving everything to DigitalOcean droplet.

Database

Connect to your droplet with SSH and restore database from SQL file taken in previous step.
mysql -u <user> -p < mydatabase.sql

Once done, create user for WordPress. In mysql console:
CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'password';

Give user privileges on WP database:
GRANT ALL PRIVILEGES ON wordpress_DB.* TO 'wordpress_user'@'localhost';
FLUSH PRIVILEGES;

Files

Connect to your droplet with FTP client and upload WordPress files.
Once done you will need to make changes.

Update database connection settings in wp-config:

/** The name of the database for WordPress */
define( ‘DB_NAME’, ‘database_name_here’ );
** MySQL database username */
define( ‘DB_USER’, ‘username_here’ );
/** MySQL database password */
define( ‘DB_PASSWORD’, ‘password_here’ );
/** MySQL hostname */
define( ‘DB_HOST’, ‘localhost’ );

Normally that would be it, but since we are moving from GoDaddy there some more settings and files we need to take care about.

Gotchas

There are few things to disable after we migrated away from GoDaddy:

  • Comment out this line in wp-config.php:
require_once( dirname( __FILE__ ) . '/gd-config.php' );

And feel free to remove gd-config.php

  • There's a drop-in plugin by GoDaddy for caching that might ruin your life. You might face issues with updating content of your site (changes not being applied, etc.)

So just rename this plug-in file in wp-content/plugins folder.

  • You might also need to re-install/recycle some plugins. In our case it was Divi builder plugin that stopped working after we moved away from GoDaddy.

All set! Hope, it's been informative for you. Good luck, have fun!

--

--