Turns out that bash has cache…

All developers, whether they like to admit it or not, will at times waste a huge amount of time trying to figure something out that has seemingly no explanation – and it turns out to just be a caching issue. This terribly common with front end web development.

Today I was installing Node.JS on a server directly from source but made a mistake. I figured, no problem, I’ll just uninstall and reinstall correctly. But the command node --version was returning an error – /usr/local/bin/node: No such file or directory.

After trying to install a million different ways, creating symlinks, and searching high and low for orphaned files… it was a simple caching issue.

Linux bash caches paths of executables. The fix is simple.

hash -d package removes the cache for a specific entry, while hash -r dumps the entire thing.

Upgrading WordPress installation to PHP7 (WHM, Easy Apache, CentOS)

After a couple of years of hearing how HHVM was dominating other installations in speed tests, I was please when earlier this year, PHP7 was finally release. Zend claimed similar (or even greater) speed gains. But the proof is in the pudding, yes?

So I set off to install and test PHP 7 on my own hosted VPS – which I recently upgraded to CentOS7 and Easy Apache 4. After months of waiting, the folks at cPanel finally released support…

PHP7 support

Unfortunately yum install ea-php70 only installs the most basic modules to the server. You’ll need to go through an find all of the modules built for PHP7 and Easy Apache. At the moment, the only method I know of identifying which modules are available is to view them through WMH (Home >> Software >> EasyApache 4). Then you can install them via command line like so… yum install ea-php70-php-gd.

Speed Increase

So here’s the before on a site running on PHP 5.6 no caching or CDN applied.


And here’s the after with the same site running PHP 7.0 with no additional configuration of any kind.


NOTE: I had to install ea-php70-php-pdo and ea-php70-php-mysqlnd to get MySQL to work with PHP7. mysql() is deprecated in PHP7 and any plugins that rely on it will throw errors as well.

That’s a full second off and and a 43% speed increase. Sweet!