RunVan (BMO Vancouver Marathon) came to us with a challenge to help them lower the monthly cost of hosting without compromising up-time and performance on their websites. This required that we perform a website migration from Amazon Web Services (AWS) to a Virtual Private Server (VPS). The new hosting solution had to cover their seasonal fluctuation of users, or at least easily scale up services during the annual event to ensure the website would both function and perform well under the increased load. Both sites are PHP driven WordPress sites and require a simple LAMP (Linux Apache MySQL PHP) server stack in order to function.

After reviewing the analytics of both of the sites we determined that a Linux VPS (Virtual Private Server) would:

  1. suit the needs of their sites
  2. cover the seasonal fluctuation without experiencing fee overages due to the increased traffic.

After backing up all the site files and databases we propagated the new servers and created spaces for both sites in cPanel. The RunVan site was a relatively easy website migration: fewer images, less site files and a smaller database. The database easily migrated within PHPMyAdmin and the site files quickly uploaded with SFTP. The BMO Vancouver Marathon site would prove to be a bit trickier:

  1. Many images hosted separately on Amazon S3 Buckets with differing URI paths
  2. many site files
  3. a massive database

Our first step was to get the backup running on the new host. We downloaded a tarball (.tar archive which is comprised of many files compressed into a single file – similar to .zip on windows) of the site files and extracted them in the new root folder of the site through SSH. The database was uploaded to the root directory and imported through SSH access via mysql to scoot around the restrictions imposed by host for PHPMyAdmin.

Our next step was remapping the images the correct wp-content folders (by date) and rewriting the URI strings in the database to map away from the s3 Buckets. For this we took a sampling of 200 images and mapped the path to three distinct Buckets. The Amazon bucket also used the distinct WordPress by date structure (eg: /08/03/image.jpg) which made restructuring the images into the appropriate /wp-content/uploads/ folder a snap. Once we had the file structure correct we remapped the URIs to the image in the database with the Velvet Blues: Update URLs plugin.

After setting our host files (Windows) on our local computers to test the website migration we switched the DNS to point to new host completing the migration.