Cloudways Hosting for WordPress Websites

I see Cloudways being for those that are comfortable with underlying server technologies, how they work with other technologies such as CDNs, optimization plugins, etc., and for those that want to spend the time “tinkering” with these technologies.

If you want to get guaranteed top-notch support so you can spend time focusing on growing your business, I recommend looking at Kinsta hosting instead.

Kinsta is available as a standalone service from WP Turned UP and is available as part of WordPress Website Care.

Cloudways Initial Setup

The following instructions are reflective of my location, requirements, recommendations, etc. Your implementation may differ slightly.

  1. Sign up for Cloudways
  2. Select your Application > Clean (No Cloudways Optimization) (Note: I choose this option because I want to know exactly what I’m optimizing.)
  3. Name your appserver, and your project
  4. Application Server > Vultr
  5. Server Size > 1 GB (Note: The idea is to scale up as needed.)
  6. Location > USA Chicago (Note: Pick a server that’s closest to the majority of your customers.)
  7. From the navigation menu, click on your avatar image and choose Account.
  8. Account > Security > Two Factor Authentication > Enable.

At this point, you will be on a 3-day, FREE trial. If you plan to stick with Cloudways, be sure to become a paying customer before your trial period ends.

Server Configuration

  1. Server Management > Settings & Packages > BASIC > PHP TIMEZONE > This is optional, but choose the location closest to you (e.g. the website management team). (Note: The management team will be the ones reviewing any PHP-related troubleshooting information, so having the timezone in relation to their location, is best.)
  2. Server Management > Settings & Packages > ADVANCED MYSQL > TIMEZONE > This is optional, but choose the location closest to us (e.g. the website management team). (Note: The management team will be the ones reviewing any PHP-related troubleshooting information, so having the timezone in relation to their location, is best.)
  3. Server Management > Settings & Packages > ADVANCED NGINX > WAF MODULE > This is optional, but I choose Cloudflare here, as that’s the CDN I’ll be integrating with.
  4. Server Management > Settings & Packages > PACKAGES PHP > In the interest of speed, functionality, and security, choose the highest PHP version allowed. (Note: Thoroughly test your website to ensure your theme and plugins fully support the version of PHP you’ve chosen.  If there are any issues, drop down a version of PHP, and test again. The goal is to run the highest version of PHP without breaking your website.)
  5. Server Management > Settings & Packages > PACKAGES MySQL > Unlike PHP, start low and end high, when it comes to setting the MySQL version. This is because the version of MySQL cannot be downgraded. In the interest of speed, functionality, and security, you want to be running the highest version of MySQL possible, without breaking your website. (Note: Thoroughly test your website to ensure your theme and plugins fully support the version of MySQL you’ve chosen.). (Note: For my WordPress servers, I use MariaDB instead of MySQL.  There are tons of articles out there if you want to do your own research.) (Note: Once you implement MariaDB, you cannot switch to MySQL. Also, if you upgrade MySQL to ANY version, from the default Cloudways version…you cannot switch to MariaDB.
  6. Server Management > Settings & Packages > PACKAGES > Redis > Install.
  7. Server Management > SMTP > This is optional but highly recommended in order to ensure emails get to your customers. I use Microsoft Office 365, so I’m going to use their SMTP services by choosing Your Own SMTPOtherHost: smtp.office365.comPort: 587, and entering credentials for a working email account.
  8. Server Management > Manage Services > Varnish > Disable (Note: With the website under development, we want to turn all caching off.).

Application Configuration

  1. Application Management > Domain Management > PRIMARY DOMAIN > Enter the domain of your website and save changes
  2. Application Management > Domain Management > SSL MANAGEMENT > Enter the domain of your website and choose to install a Wildcard SSL certificate.  (Note: Configuring the certificate as a wildcard certificate from the start allows you to automatically cover all of your subdomains that are used for this application.)
  3. Application Management > Application Settings > Folder > Change the default folder name to  “live” (or similar)  so that it’s easily recognized as the production server. 
  4. Application Management > In the bottom right of your screen, you’ll see a yellow circle with some white squares. Hover over that circle and choose Clone App/Create Staging.
  5. Choose Same Server. (Note: By choosing this option, you are not incurring additional charges that a new server would bring.)  (Note: If you want to take your disaster recovery to a whole new level, choosing New Server may be desirable. This may be required for things like PCI Compliance.)
  6. Check the Create as Staging box and Submit. (Note: If you don’t check the box, your application will simply be copied and not set up for a true WordPress staging environment.)
  7. Staging Application > Staging Management > Application Settings > Folder > Change the default folder name to  “staging” (or similar)  so that it’s easily recognized as the staging server
  8. Staging Application > Staging Management Domain Management > PRIMARY DOMAIN > Enter “staging.yourdomain.com” and save changes

Server Management

SFTP

I use the FREE, FileZilla FTP application for managing my websites, so these steps will reflect the usage of that application.

  1. FileZilla > Site Manager > New Site
  2. FileZilla > Site Manager > Protocol > SFTP
  3. FileZilla > Site Manager > Host > Enter the IP address of your Cloudways server
  4. FileZilla > Site Manager > User/Password > Enter the credentials of your master account of your Cloudways server

When viewing your applications via FTP/SFTP, if you followed the instructions above, you should notice a folder named “live” and a folder named “staging”<default_app_name”>. Going forward, you should only access these folders, ignoring the default folder names. 

Cloudways engineers didn’t have an explanation for why the renaming of folders causes duplicate folders, but my guess is that it has something to do with the backup/restore process.</default_app_name”>

Caching for MyListing Websites

Once you have your website ready, or about ready for launch, you want to think about turning on the various levels of caching.

There is no silver bullet here as far as which levels of caching should be enabled, however, I’ve provided some general recommendations.

Varnish

Varnish works as an HTTP accelerator, caching static objects such as images, scripts, etc. in memory, so the process of reading this information is much faster and more efficient.

My recommendation is to consider implementing Varnish at the time you’re ready to launch your website (not while developing it), but not just turn it on because you can.

Run proper testing over time, and then establish whether Varnish is something you absolutely want to keep around.

In my experience, Varnish is more trouble than it is worth, especially with how it interacts with WooCommerce, so I leave it disabled.

Varnish Implementation

When/if it comes time to enable Varnish, here are the steps.

  1. Server Management > Manage Services > Varnish > Enable.
  2. Enable exclusion rules for WooCommerce as listed in the section below.

Exclude WooCommerce from Varnish

Since MyListing websites are heavily-reliant on WooCommerce, we want to exclude the following from Varnish caching, by going to Application Management > Application Settings > Varnish Settings > Add New Rule.

Type: URL
Method: Exclude
Value: ^/(cart|my-account/*|checkout|wc-api/*|addons|logout|lost-password|product/*|wp-admin|wp-login)

Type: URL
Method: Exclude
Value: \?add-to-cart=

Type: Cookie
Method: Exclude
Value: woocommerce_cart_hash

Type:
Cookie
Method: Exclude
Value: woocommerce_items_in_cart

Type: Cookie
Method: Exclude
Value: wp_woocommerce_session_

Note: Be sure to check out the Configure WP Rocket for WordPress Websites on Cloudways guide for more information on this topic and others.

Redis

Given the highly dynamic nature of the data involved in MyListing websites, Redis (Object Caching) can be an extremely welcomed addition to your technology stack in order to speed up repeated database queries.

The less-sophisticated, but still powerful alternative to Redis, Memcached, is already deployed on Cloudways servers by default and is sometimes Memcached all you’ll ever need.

However, if your site gets a ton of traffic and it’s dynamic, you should consider using Redis.

Redis Implementation

When/if it comes time to enable Redis, here are the steps.

  1. Enable it server-side by going to Server Management > Settings & Packages > Packages > Redis and clicking Install.
  2. Install and Activate the Redis Object Cache plugin.
  3. Enable it application-side by going to WordPress > Settings > Redis and click the Enable Object Cache button. (Note: Verify that Redis is working, using this same page, by looking for a status of “Connected”.).

Cloudflare Integration

I use Cloudflare for DNS management, as it’s proven to provide faster DNS services when compared to traditional domain hosting companies.

Check out the Implement Cloudflare’s CDN for Better WordPress Security and Performance guide for easy setup.

Move an Application to Another Server in the Same Account

Moving applications (i.e. WordPress installs) between servers within the same Cloudways account is super easy and here are the steps to do it.

  1. Once you are logged into your Cloudways account, click on the ‘Applications’ menu item.
  2. Locate the application you wish to move and click the three vertical dots that appear at the far right of the application.
  3. Select ‘Clone App/Create Staging’.
  4. Choose the server you wish to move your application to (or create a new server) and click ‘Continue’.
  5. Once the cloning process is complete, look for the cloned application (it will be named ‘Cloned-<yourappname>’), and click on it to edit it.
  6. Domain Management > Put in the Primary Domain and ‘Save Changes’. (Note: This doesn’t care over during the clone, so just use the same domain as you did in the application you cloned.).
  7. SSL Certificate > Enter your email address and enter your Primary Domain again, for the ‘Domain Name’ field.
  8. Check the ‘Apply WildCard’ box and click ‘Install Certificate’. (Note: This should fail and that’s okay.).
  9. Repeat the previous step and Cloudways will present you with a CNAME record.
  10. Add the CNAME record to your DNS provider account, wait a couple of minutes, and then click ‘Verify DNS’. (Note: You should receive a “Your domain DNS has been verified. Please continue with certificate installation.” message, but if you don’t just give it a bit more time.).
  11. Click ‘Install Certificate’.
  12. Back at your DNS Provider, change the A Record of this particular website to point to your new Public IP which is shown on the ‘Access Details’ tab of your newly-cloned application.
  13. Rename your application, by removing the ‘Cloned-‘ portion from the front of it, or give it a new name altogether.
  14. Browse back to your other server and delete the application from step #2.
  15. Once you delete the application, be sure to also delete the server if it is no longer hosting any applications, to avoid any unnecessary charges.

Cloudways Alternative

I recommend Kinsta as the best overall WordPress website hosting vendor, due to its simplified management dashboard, high-performing technology stack, and a high level of support that’s not always seen with Cloudways.

If you do decide to make the move to Kinsta, check out the Kinsta Hosting for WordPress Websites guide and take advantage of WP Turned UP’s special Kinsta offer.