• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

Server Stuff

Can’t use AdminerNeo on Mac

July 6, 2026 by Webhead

Problem

I was having a similar issue as this person on the Local Community forum. Clicking the link of “Open AdminerNeo” did nothing and the logs showed “Unhandled Rejection”.

Solution

Apparently Local has a preferred PHP version which is currently
PHP—8.2.29
. I did some spring cleaning and removed that unknowingly required version of PHP. Restoring that version resolved my issue. Unfortunately, I can’t reply to that locked forum post.

Filed Under: Off the Shelf, Server Stuff Tagged With: wordpress

Run Long Jobs in Background on Linux

October 17, 2025 by Webhead

To run long running jobs on linux and not have to be logged in, do the following:

1. Start a new screen session

screen -L -S longjob

2. Run your long-running command

This will allow you to see the output of the command while it’s also written to a log file

your-command --with --args |& tee -a ~/longjob.log

3. Detach and leave it running

Ctrl + A then D

4. Log out safely

exit

5. Reattach later

screen -r longjob

6. When you’re done

Ctrl + D

Filed Under: Server Stuff Tagged With: linux

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

June 18, 2019 by Webhead

Note:  I have websites hosted at WPEngine, Kinsta, AND Cloudways. Links to these hosts are affiliate links because I believe all these options are quality hosting companies.

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.  Computing resources are 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 (or don’t mind the high cost)
  • Want things already setup and pretty
  • Don’t have a membership site.  You have a mostly static site that is cacheable.
  • Want more dev tools or want a larger company managing your server.

WPEngine has the most tools and is the most funded company of the three here. 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 can be a bit crowded. WPEngine is still fast and reliable, but if you need a lot of dynamic processing I wouldn’t recommend them. Visit their pricing page.

Use Kinsta if

  • you have 5 or more websites (or don’t mind the high cost)
  • Want good logging
  • Want a set number of resources for your website
  • Want things already setup and pretty

Kinsta is faster than WPEngine in terms of processing dynamic pages. For example the WordPress admin dashboard is noticeably faster. 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 and host your site on Google Cloud Engine.

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, Linode, and others. You pay for what you need.  Cloudways allows you to add on resources as you need them. Visit their pricing page.

Filed Under: Server Stuff Tagged With: cloudways, hosting, kinsta, linux, wordpress, wpengine

PHP 7.2 and the 502 error

March 11, 2019 by Webhead

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.

Filed Under: Coding, Server Stuff Tagged With: 502, php, php 7.2

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

December 11, 2017 by Webhead

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:

https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

Filed Under: Coding, Server Stuff Tagged With: chrome, google

Git Copy

August 1, 2016 by Webhead

This may be obvious to the git experts, but I am not that.  There also may be a better way to do this, but again, not a git expert.

I have a git repo set up on WPEngine, but they only allow the whole server to be a repo, not just a single plugin.  This was a problem since the whole server directory was not in my current repo.  So it was either make a new repo which was basically a copy of my current repo but a different folder structure or keep on using SFTP.  I decided to make a new duplicate repo.  The problem (which i also had with SFTP) was finding the files that changed and pushing them to the server.  This is both error-prone and slow.  I found a script that could copy all changed files from the last commit into my WPEngine deploy directory and also discovered a way to do this automatically when pushing from my main repo.

Create/Save this script in .git/hooks/pre-push file.  This would be in the main git repo I work in.  This copies all changed files to the WPEngine deployment repo.

#!/bin/bash

TARGET=”/your/deployment/path”
MOST_RECENT=$(git log -n 1 –pretty=format:’%h’)
PREV=$(git log –skip=1 -n 1 –pretty=format:’%h’)

echo “Coping to $TARGET”
for i in $(git diff –name-only $MOST_RECENT $PREV)
do
# First create the target directory, if it doesn’t exist.
mkdir -p “$TARGET/$(dirname $i)”
# Then copy over the file.
cp “$i” “$TARGET/$i”
done
exit 0

Thanks to the following articles about pre-push hooks and how to get the files between commits.

http://www.phprepo.in/2012/04/git-copy-all-changed-files-between-two-commits-with-directory-structure/

http://blog.ittybittyapps.com/blog/2013/09/03/git-pre-push/

Filed Under: Server Stuff

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 5
  • Go to Next Page »

Primary Sidebar

Topics

apache apple chrome cms css debug eCommerce embed filters firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization macOS mac os x markdown ms sql mysql open source optimize php seo svg tinymce vs code woocommerce wordpress wpengine xss yii youtube

Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized