The past decade has seen a mad rush “to the cloud”, as performance requirements (speed and availability) for apps, websites, and other technology have increased.

For me, it seems like I’ve been looking for a solid place to host my websites for as long as I’ve been building them, as far back as 2000, when I set up my first ecommerce store on a shared server business shopping cart platform called BizHosting. Between then and now, I’ve tried all of the popular hosting companies, including GoDaddy, HostGator, BlueHost, and most recently LiquidWeb. When one host would underperform, I’d move to another one. When that one disappointed me, I’d move to the next.

Over the past five years, I’ve been tempted to jump in and spend the time figuring out how to setup my ecommerce stores on one of the popular cloud hosts. I looked long and hard at using Amazon AWS, DigitalOcean, and the Google Cloud Platform. Each time I dug in and tried to make some progress, I found myself overwhelmed and unable to make the switch.

Over the past few months, I’ve been getting so many error messages and experiencing so many performance issues with my Liquid Web VPS account that the pressure to move my dozen or so sites somewhere has motivated me to shop around.

I’ve heard that pricing and features are comparable between the most popular cloud hosting providers, but when I looked at Google Cloud, I saw that they’re running a promotion in which they give you $300 towards free hosting (including resources like static IP addresses and Compute Engine instances) that can be used over a 12-month period. That sold me. I signed up and started moving my first website over.

I’m going to walk you through the process of moving your WordPress (lots of this stuff applies to websites built on other platforms too, but mine all run on WordPress) website from wherever you’re currently hosting it to getting all set up on the Google Cloud Platform, which has lots and lots of benefits, including cheaper overall cost (typically), much better performance, and more control over the nuts and bolts of your website or web-based application.

Although what I’ll explain here walks specifically through the process of migrating a WordPress website, you can use much of this documentation for migrating other types of websites (Joomla, Drupal, Ghost, etc) from your old-school, low-performance type of host over to Google Cloud. The main difference is your data migration procedure. I’ll use a WordPress plugin called All-in-One WP Migration for my explanation. Other content management systems (almost any one that’s worth using) typically have their own respective mechanisms for creating backups of themselves that can be used to replicate the website.

Shout Out to One Page Zen

As I was considering and then working through the process of migrating to Google Cloud, a complicated ordeal for someone who knows only an average amount about networking and web hosting, I found myself relying upon the tutorials (which were up to date amazingly, even tracking changes from the Google Cloud menu layout) of One Page Zen. I have to publicly say thanks to those guys for being very detailed about how to perform several of the steps I’ll explain below. I’m including a link to the tutorials they publish on each of these topics, including in written form as well as with video walk-throughs.

Setting Up WordPress on Google Cloud Platform

The first step to migrating your WordPress website over to Google Cloud is to create a new WordPress site on Google Cloud. You’ll use this new WordPress site as a sort of landing pad when you move the information (i.e. theme files and database) over from your old website.

Following along with the One Page Zen tutorial, I used the WordPress Google Click to Deploy installation from the Google Cloud Marketplace.

Follow along with the One Page Zen WordPress setup tutorial to see the details of how to set up WordPress on Google Cloud.

Transfer Your WordPress Website Content to Google Cloud

After you have set up your new WordPress website (using the Google Click to Deploy installation, which differs from Bitnami, Multisite, and other types of WordPress installations) on Google Cloud, it’s time to move your old WordPress data over.

The One Page Zen tutorial on how to do this WordPress migration uses the All-in-One WP Migration WordPress plugin, which worked perfectly for me. To summarize, you download and install the plugin on both your existing site and the new WordPress instance you’re moving to. You then do a full export from your old site, after which you’ll import into your new WordPress site using the file you downloaded from the export step.

Because of how big my website is, I ran into the problem of not having enough memory and processing time allocated for doing the import into the new WordPress site. To fix that problem (and you’re almost guaranteed to have it) you’ll need to increase the memory limit. Fortunately, One Page Zen provides a tutorial that describes how to increase this limit. In my case, I found that the limit was initially 64MB, and I had to increase it to nearly 1GB to get the import to work correctly. I’m not sure whether it was completely necessary, but in addition to increasing the upload_max_filesize and post_max_size variables, I also increased the memory_limit,  the max_execution_time, and max_input_time variables according to the support article that was written by the author of the All-in-One WP Migration plugin.

After the Site Migration: Networking Tasks

Now that you’ve got a new version of your website set up on Google Cloud, you need to do a few networking things to finish up, including:

  • Create a static IP address for your new website instance
  • Point your domain to your new hosting location
  • Install an SSL certificate on your new website

Setting Up a Static IP Address on Google Cloud

You’ll need to associate a static ip address with your website if you want to install an SSL certificate. Having your site secured with SSL used to be kind of optional unless you were running an ecommerce website with a checkout system that needed to be encrypted, but now it’s imperative for all websites that want to be in compliance with what Google and other search engines have standardized for user privacy and protection.

As you might have thought, One Page Zen also has a tutorial that walks you through the not-so-complicated process of reserving a static IP address using the Google Cloud Platform console.

Transferring Your Domain to Google Cloud

Another critical step you’ll need to take is to transfer your domain over to point to the Google Cloud Platform DNS servers instead of your old location.

Follow the One Page Zen tutorial for changing the DNS information for your domain.

Installing LetsEncrypt SSL on Your Domain

With your static IP address set up, and with your domain now pointing to the new version of your website on Google Cloud, you can now secure your website with an SSL certificate from LetsEncrypt. With LetsEncrypt, you can have a free SSL certificate, which is a great advantage over the old SSL certificates that you had to pay for. One Page Zen’s tutorial that covers setting up SSL using LetsEncrypt includes an important section that uses a cron entry to renew the certificate automatically so that it doesn’t expire after just a few months.

Fixing WordPress Permalinks

After I followed these tutorials and had my website all set up and looking like it was working as I’d hoped, I noticed that my internal links were not working unless I changed them to the default WordPress URLs that used query parameters instead of SEO friendly URLs like I had on the old version. I was getting 500 errors each time I tried to access one of my pages or posts.

I found a tutorial on Studio40k.com that helped me figure out how to fix that issue, which involved editing my apache configuration file.

All Set Up on Google Cloud Platform

I was surprised at how straight-forward these steps were to follow. I hope you have the same success I experienced moving from a host that was limiting and even frustrating to an experience that is much more fulfilling.

If you run into snags or have advice that might be useful for other Prosperopedia.com readers, feel free to share them with us here.