Table of Contents

  1. Backstory
  2. Select Cloudflare in the WAF Module
  3. Install the Cloudflare Flexible SSL, Really Simple SSL Plugins on the Old Host
  4. Turn off Cloudflare CDN, Point Your Domain & Generate Let's Encrypt SSL
  5. Switch Back to The Old Host, Turn on Cloudflare CDN & Migrate
  6. Need help?

Migrate a Cloudflare-Enabled WordPress Site to CloudWays

I’ve been using CloudWays for a while; it turns out to be a great platform to spin-up servers and manage applications efficiently. Quite frankly, they are one of the best hosting providers out there that promise quality managed-hosting solutions for affordable pricing.

This guide is only applicable to Cloudflare free SSL certificate users.

Previously, I wrote a quick guide on how to set up CloudWays Let’s Encrypt SSL and Cloudflare SSL together without throwing an infinite redirection loop or 5xx errors. Today, I’ll show you how to migrate a Cloudflare-enabled WordPress site to Cloudways seamlessly without hurting the SEO and HSTS settings.


Click here to skip the backstory and jump to the main steps.

Well, I decided to pen this guide because I’ve gone through the same situation. I had more than 10 WordPress instances on my BandwagonHOST server. They are fantastic, but I wanted dedicated Singapore servers, and DigitalOcean was the only reasonable option left.

However, there are limitations when you directly use DigitalOcean. It doesn’t come up with impressive end-user-friendly features like CloudWays. On top of that, I prefer to give dedicated access to my clients and add them as the team members. DigitalOcean can be too much for the client-side. CloudWays seems more flexible for clients with inter-mediate WordPress skills.

Hence I chose CloudWays and decided to move all the WordPress sites. I had to go through a few uninvited hiccups during the transition (damn infinite redirection loop).

Finally, I figured out a quick solution to fix these issues and make my website migrations an easy-peasy process.

Select Cloudflare in the WAF Module

Quite important. Do it before migrating your WordPress sites to CloudWays.

Log into the Cloudways Platform with your credentials. Then click on the Advanced tab in the Server Settings & Packages section under the Server Management area.

CloudWays Advanced Tab

Under the Advanced tab. Select CloudFlare under WAF Module and save the settings by clicking on Save Changes.

Install the Cloudflare Flexible SSL, Really Simple SSL Plugins on the Old Host

Doing this will promise 100% successful migration. I’m sure you’ve already installed these plugins on your WordPress site to avoid Cloudflare redirection loop. Do it if you haven’t.

Flexible SSL

This plugin is essential for enabling Flexible SSL on WordPress and will prevent infinite redirect loops when loading your Cloudways WordPress sites under CloudFlare’s Flexible SSL system.

Install the Cloudflare Flexible SSL Plugin

Download Cloudflare Flexible SSL Plugin.

Really simple SSL

This plugin makes sure your site is loading over https://all the time. It is essential to install this one as well.

Install really simple SSL Cloudflare

Download Really Simple SSL Plugin.

Turn off Cloudflare CDN, Point Your Domain & Generate Let’s Encrypt SSL

Next tip to make sure the site works well after migration. We can temporarily point the domain to the new CloudWays host (server) for a few minutes just to generate Let’s Encrypt SSL. We’re doing this to make sure the host won’t throw any hiccups after migration.

Why Should I Point My Domain to CloudWays?

It is not possible to create Let’s Encrypt SSL certificates in Cloudways platform while the CloudFlare CDN is active, so turn it off by clicking the Orange Cloud as shown in the image. The Grey Cloud means CloudFlare CDN is off.

Turning off Cloudflare CDN & Pointing The Domain

Turn off DNS as shown in the image below. Replace with your server’s IP.

Turn off Cloudflare CDN to generate CloudWays Let's Encrypt SSL Certificates

Now visit the CloudWays platform and fill in your PRIMARY DOMAIN in the Domain Management section. Save Changes afterward.

How to point your Domain to CloudWays

Generate Let’s Encrypt SSL Certificate

Now generate the Let’s Encrypt SSL certificate by accessing the SSL Certificate section. Be sure to create a Wildcard SSL Certificate and set a new CNAME record as suggested by CloudWays.

Generate SSL Cloudways

Save Changes and wait for CloudWays to generate Let’s Encrypt SSL certificate.

You can confirm the Let’s Encrypt SSL status by visiting the newly propagated WordPress site over https. Click on the padlock from the URL bar, and check detailed SSL certificate info.

Switch Back to The Old Host, Turn on Cloudflare CDN & Migrate

This process is dead simple. Just edit the A record and fill your old host’s IP address. Then turn on Cloudflare CDN.


Visit the old website, download and Install CloudWays WordPress Migrator. The plugin is quite intuitive, and it will do the rest.

Pro tip: Disable security plugins and add-ons before migrating. Doing so will make sure that the new host doesn’t get confused by your security settings. i.e. disable backend URL modifications just to be on the safe side. You can activate these plugins after migration.

Cloudways WordPress Migrator

Download CloudWays WordPress Migrator

Enable SSH Access & Generate Credentials

Enable SSH access within the Application Settings.

Enable SSH access CloudWays

Generate App Credentials also.

Enable SFTP CloudWays

Now enter the following details in the plugin interface to migrate:

  1. Enter any email address.
  2. Your Destination Site URL (fill in your domainname.tld with https enabled since we’ve already set the primary domain and generated SSL certificate in the CloudWays Application Settings interface).
  3. Enter your Database name.
  4. Enter your Server Public IP address.
  5. SFTP Username (for the particular app).
  6. SFTP Password.
  7. Agree to TOS and click on Migrate button to start migrating your website.

Here’s how it may look like:

Migrate Your Site to Cloudways

That’s about it. Good luck!


Here are my answers to the questions someone posted on Cloudflare community website.

Q. The actual migration itself is as simple as pointing the A record to the new domain, right?

A. No, refer to the guide.

Q. Will WordPress sort out the URL issues, images and such when the staging site’s URL gets changed? What steps do I need to take to not end up with problems and broken images?

A. No need to worry, just use the migrator plugin as suggested in the guide.

Q. How do I ensure that the SSL certificate works when the migration is done – shall I install the SSL already on the staging site?

A. Please refer to this section in the guide.

Q. I have the option to use Let’sEncrypt SSL’s automatically from Cloudways – shall I opt for this rather than the Cloudflare certificate? If so, how and when do I make this switch?

A. You should opt for both. Read my previous guide on how to set up CloudWays Let’s Encrypt SSL and Cloudflare SSL together.

Q. Do I create a new Cloudflare account for the staging site with a new SSL certificate?

A. You wouldn’t need a staging site at all. You can create a subdomain and point it to CloudWays if you’re too worried.

Q. Do I migrate the site without SSL certificate first and then only apply it once the domain migration is completed?

A. No need, just follow my instructions in this guide.

Q. How do I ensure that the HSTS settings don’t leave my site hanging, or people unable to reach the site?

A. It will work after the migration.

Q. SEO-wise, is there anything to consider during a migration?

A. None and no need to worry about SEO.

Need help?

Does this guide sound too much of a tech jargon? I can help you migrate your Cloudflare-enabled site to CloudWays host for the price of a cup of coffee. Contact me right away!

Written by MighilMighil is an indie musician and tinkerer with diverse work experience in technology and writing. He has had the privilege of serving in various capacities, encompassing generalist and specialist roles. He is currently based in Chengdu.


Opt-in to receive long-form essays in your inbox. Unsubscribe anytime. Follow me on 𝕏 if you like.

Powered by DigitalOcean, BunnyCDN, WordPress.