WPEngine, Kinsta, or Cloudways – Which host is best?

Note:  I have websites hosted at WPEngine, Kinsta, AND Cloudways and so links to these hosts are affiliate links.

The Players

First off, all hosts being compared here do managed hosting.  This means the host takes care of the server and possibly WordPress keeping your server up-to-date so you don’t need to worry about it.

WPEngine was founded in 2010 and employs 251 – 500 employees at the time of this writing according to Crunchbase.  They are located in Texas, USA and are very well funded. Automattic, the company behind WordPress was an initial investor in this venture.  WPEngine at one time used Linode servers, but I believe they are now using Google Cloud Engine servers. WPEngine does shared hosting where they host a number of websites that share a pool of resources.  I have been using WPEngine since 2014.

Kinsta came onto the managed hosting scene in 2013.  They are a small company employing 11 – 50 employees and are located in California, USA.  Kinsta uses Google Cloud Engine and is a blend of shared hosting and VPS. Their resources are shared over their websites, but the software that runs each site is only for that site.  They also allocate a set number of PHP workers to each site which prevents your site from going down because of a bad neighbor. I started using Kinsta in 2019 after some horrible 502 errors could not be resolved on WPEngine.

Cloudways started in 2012.  They are also a small company with 11 – 50 employees and are located in Mosta, Malta.  Where is that? Well, somewhere in the Mediterranean Sea below Italy.  Cloudways is basically a reseller of Amazon Web Services (AWS), Google Cloud Engine (GCE), Lindoe, and other cloud services.  Why not just go directly to the cloud services? Cloudways sets up the WordPress, Joomla, Magento server for you and keeps the server up-to-date.  They also make it much easier to use those cloud services with their own control panel. Cloudways basically offers Managed VPS hosting, but on cloud servers. Currently this website is hosted on Cloudways and has been since 2019. I decided to look for a host that used cloud services like Kinsta, but at a cheaper rate and found Cloudways.

The Good

WPEngine is one of the first managed WordPress hosts.  They offer secure hosting with CDN, caching, backup/restore, and multiple environments all with a few clicks.  The more WordPress installs you have the cheaper they get. WPEngine is constantly adding to their feature list with Content and Page Performance tools, git repositories, Genesis Themes, and now a Devkit that allows you to setup a local environment that can push and pull from WPEngine.

Kinsta’s logging interface and speed are outstanding.  If you thought WPEngine was fast, Kinsta is faster, especially for websites which have a membership or logged in area.  Because Kinsta dedicates 2 PHP workers to your site, you constantly get speedy responses when doing operations that require PHP (like a search or add/update/delete operations).  Kinsta has similar one-click staging, CDN setup, caching, and backup/restore like WPEngine. However, it exceeded my expectations in its logging interface. Logs show you instantly in a graphical way if you have any 5xx (500, 502, 504, etc), 4xx, 3xx, and 2xx responses and what URLs reported them. See here for how beautiful this all looks and how easy it is to identify.  This along with having a set number of PHP Workers (not variable like WPEngine) allowed me to resolve 502 errors which I couldn’t do on WPEngine.

Cloudways is the cheapest solution of the three.  For $10/month you could have multiple small websites running. See here for pricing.  If you need more, you pay for what you need. Cloudways’ moto is all about having choice. They have tiered plans to increase RAM and number of CPUs but if you just need bandwidth or storage you can do that separately and only pay for what you need.  Cloudways like Kinsta uses Google Cloud Engine, but you can also choose other cloud services which are all just as fast (ok, maybe .1ms differences between them). Their pricing structure allows customers with 1 website to thousands of websites to have very cheap hosting.

The Bad

WPEngine used to have superb support with quick response times and a knowledgeable staff.  Now, WPEngine’s support can only answer basic questions and at times there is a long queue.

Another issue with WPEngine is that they are a shared hosting environment.  Back in 2014 their servers only had around 50 sites per server.  Now it’s in the hundreds so their speed has suffered a little. Resources are also becoming scarce as neighboring sites on your server take up all the processing (php workers) and leave you with 502 or 504 errors.  I’ve had one site that was crippled by these errors right after upgrading to PHP 7. Hence the trying out Kinsta.

I’d have to say Kinsta is the best host out of the three… oops, not yet, we’re still in the bad section. I really don’t have anything bad to say about Kinsta.

Cloudways is cheap for a reason.  They don’t have tools that WPEngine or Kinsta have and a lot of the one-click setup like cache, CDN, or even viewing logs is not there.  To view logs you have to use SSH/SFTP and download the log file. To setup caching you’ll need to install their plugin and do some simple setup.  Setting up a staging site is a bit more involved than clicking a button, but doable. No command line knowledge is needed, just a bunch of clicking and going through some tutorials.

Another issue I had with Cloudways is the discrepancies between support and the knowledge base.  On multiple instances I had to inform support that their knowledge base was conflicting what they were telling me.  I guess on the plus side they corrected it the next day.

The Recommendation

If I was so happy with one host I’d probably not have this review page comparing three different hosts.  So each host is recommended depending on your situation.

Use WPEngine if

  • you have 5 or more websites
  • don’t want to do a little setup work
  • Don’t have a membership site.  You have a mostly static site that is cacheable.
  • Want more dev tools
  • You really really want to.

WPEngine has the most tools and is the most funded company of the three here. But that’s about it. If you don’t care for the dev tools they offer, I’d recommend one of the other two choices. Support is not so great and their servers are a bit crowded. WPEngine has the slowest response times of the three listed here, but it’s still faster than most shared hosts. 5 years ago I was a WPEngine advocate. Times have changed and the competition has caught up. Visit their pricing page if you want those tools.

Use Kinsta if

  • Want good logging
  • Want a set number of resources for your website
  • Don’t want to do a little setup work

Kinsta is faster than WPEngine and has the necessary tools to make them easy to use.  Their logging interface will allow you to debug your website better. The set number of PHP workers for your environment prevents the “noisy neighbor” problem.  Be assured you won’t have your resources taken by other websites. Visit their pricing page.

Use Cloudways if

  • You want the cheapest solution
  • You like choices
  • Don’t mind doing a little setup

Cloudways allows customers with any amount of websites to have a very affordable hosting solution.  You can have as many installs as you want on your server and pick from AWS, GCE, Lindoe, and others. You pay for what you need.  Cloudways is just as fast as Kinsta as they both use cloud services. Visit their pricing page.

Tagged with: , , , , ,

Shorthand for array

Recently I jumped on a project that uses the shorthand to declare an array by using the brackets []. I wondered why I have been using “array()” this whole time besides it being common in WordPress. Only to realize after deploying a plugin to a very old and out of date site that “[]” is not valid syntax in PHP 5.3.

Tagged with: ,

PHP 7.2 and the 502 error

My site was running fine and dandy for a few years.  I made the necessary adjustments to make it compatible with PHP 7.2 and upgraded the server.  A few days later I started receiving random 502 errors.

The problem apparently was a simple else if statement within a WordPress filter.  Here is the important parts of the code:

function php72_killer() {
  for($hour = 8; $hour < 17; $hour++) :
    $display_hour = $hour;
    $ampm = 'am';
    if ( $hour == 0 ) {
      $display_hour = 12;
    }
    else if ( $hour > 12 ) {
      $display_hour = $hour - 12;
      $ampm = 'pm';
    }
    else if ($hour==12) {
      $ampm = 'pm';
    }
  endfor;
}
add_meta_box( 'some_id', 'Section Title', 'php72_killer', 'post_type', 'normal' );

That last else if turned out to be the problem?  Why?  I don’t fully understand, but I found PHP 7.2 introduced optimized else ifs:  https://derickrethans.nl/php7.2-switch.html

It’s important to note that this for loop with if-statements outside of the WordPress callback doesn’t cause random 502 errors.

So what fixed my 502 errors?  not having a 2nd else if:

function php72_killer() {
  for($hour = 8; $hour < 17; $hour++) :
    $display_hour = $hour;
    $ampm = 'am';
    if ( $hour == 0 ) {
      $display_hour = 12;
    }
    else if ( $hour > 12 ) {
      $display_hour = $hour - 12;
      $ampm = 'pm';
    }
    if ($hour==12) {
      $ampm = 'pm';
    }
  endfor;
}
add_meta_box( 'some_id', 'Section Title', 'php72_killer', 'post_type', 'normal' );

Go figure.

Tagged with: , ,

SVG as Background

When using an SVG as background with background-size: cover, the background would sometimes appear with a space on the left side.  Depending on the browser width it would be anywhere from 1px to 5px.   To solve this the SVG needs the preserveAspectRatio=”none” property.

Found the solution to a similar problem here: https://stackoverflow.com/questions/9185434/using-svg-as-background-image

Tagged with:

Print a trace of the call stack

In javascript you can print the call stack with something like this:

function print_call_stack() {
  var stack = new Error().stack;
  console.log("PRINTING CALL STACK");
  console.log( stack );
}

from: https://stackoverflow.com/questions/4671031/print-function-log-stack-trace-for-entire-program-using-firebug

Tagged with:

Javascript Done Resize

Normally code in the resize event is meant to just run once when the user is done resizing.  This code below, from css-tricks and seen elsewhere will do the trick:


var resizeTimer;
$(window).on('resize', function(e) {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
// Run code here, resizing has "stopped"
}, 250);
});

Tagged with:

PHPUnit and PHP 7 problems

Problem

I’m using PHPUnit 5.5, upgraded my PHP version to 7.2.  Two problems actually occur.  First there’s this weird error:

Fatal error: Declaration of SebastianBergmann\Comparator\DOMNodeComparator::assertEquals…

Then figuring PHPUnit needs to be upgraded, I ran

phpunit –self-upgrade

And that failed with the same error.  Changing my PHP version back down to 5.6 and running then causes this error:

internal corruption of phar “…phpunit-temp.phar” (truncated entry)

 

Solution

Unfortunately PHPUnit 5.5 only supports up to version 7.1 and any old version of PHPUnit that has an “old” certificate needs to be downloaded/updated manually.

https://github.com/sebastianbergmann/phpunit/issues/1688

 

How to stop redirect from http:// to https:// in Chrome

Problem

I’ve been trying like crazy to get to my local website at site.dev, but I keep getting redirected to https://site.dev and of course it doesn’t work because I don’t have a SSL certificate for that domain.

Solution

As of December 2017, Chrome 63, Chrome is forcing all .dev domains to be redirected to HTTPS via a preloaded HTTP Strict Transport Security (HSTS) header.  The .dev TLD is an actual legitimate TLD so you will need to change your local development setup to use something like http://site.localhost .

A more detailed explanation can be found here:

Chrome to force .dev domains to HTTPS via preloaded HSTS

Tagged with: ,

SVG height not scaling properly on IE 10

Problem

IE 10 shows a skewed svg image who’s width is set to a specific value and height is auto.

 

Solution

The problem is the width and height in the SVG file is set and IE is following those specs if you don’t set it.  So if you’re image is 100×100 and you set only the width to 50px, the height will remain at 100px.  The solution is to remove the width and height attributes in the <svg> tag.

Caveats

A solution on a github gist suggests that removing the width and height attributes force the image to occupy the full width of its container in non-IE browers.  All my current images with SVG are supposed to fill the width so this isn’t a problem for me.
Link to the gist: https://gist.github.com/larrybotha/7881691

Tagged with: ,

wpdb insert returning false

Problem

When running wpdb->insert the result returns false.  All the values seem to check out to be fine.

 

Solution

The problem might be due to this bug in WordPress.  Basically one of your fields is too long and WordPress is not completing the insert.  Reading through the ticket, it seems it is a WordPress error and not a MySql error so it would be pretty difficult to go through all the fields, determine the column field size limits, and then return an error of some sort.  Anyway, this is one possible reason to wpdb->insert returning false.

Tagged with: ,
Top