Posted on December 11, 2019Categories AWS, PHP, Security, Technology, WordPressTags , , , , , ,   Leave a comment on AWS LEMP Stacks and EFS Issues

AWS LEMP Stacks and EFS Issues

Lesson learned — if you are using EFS on production systems you want to be using provisioned throughput mode. But, before we get into that, let’s go over the details of this implementation… Service Configuration We utilize AWS EC2 instances to run multiple WordPress sites hosted in different directories. The configuration is fairly standard: 2+ servers configured as part of an load-balanced cluster. The servers run from the same image meaning they use the same underlying software stack. Part of … Continue reading “AWS LEMP Stacks and EFS Issues”

Posted on May 8, 2019Categories PHP, Programming, Technology, WordPressTags , , , , 2 Comments on Ubuntu Trusty: PHP 7.2 MIA

Ubuntu Trusty: PHP 7.2 MIA

Working with Varying Vagrant Vagrants today and having problems spinning up a new box? Don’t blame yourself. It appears that the PHP 7.2 libs… in fact ALL of the PHP libs for Ubuntu Trusty have gone away. The ppa:ondrej/php repository that is cited everywhere has decided it is not going to serve up any PHP code to your Vagrant boxes today. Maybe they’ll fix it soon. Maybe not. If anyone has a workaround please comment here.

Posted on February 25, 2019Categories Networks, PHP, TechnologyTags , , 1 Comment on High Volume Tuning PHP FPM on nginx

High Volume Tuning PHP FPM on nginx

As the My Store Locator Plus® service continues to grow we are finding it more important than ever to fine tune our web server and PHP processes to better serve the larger data and network demands. A recent review of performance showed process timeouts happening during large data imports and side-loading; especially when the read and write endpoints hit the same server node. Here are some things we did to improve performance. Get off faux sockets PHP FPM is typically … Continue reading “High Volume Tuning PHP FPM on nginx”

Posted on August 1, 2018Categories Development, PHPTags , , ,   Leave a comment on PHP __set() Magic Method Conundrum

PHP __set() Magic Method Conundrum

I am completely baffled by this one and hope one of my techie friends can help. I’m using a PHP class with magic methods to set and get the properties of that class.    The idea is to use private properties in the class so that the PHP magic methods can take over and determine whether to update a WordPress user meta entry, blog entry, or standard option based on which proper of the class is being retrieved or stored.

Posted on February 8, 2018Categories PHP, Programming, WordPressTags , , , , 1 Comment on Improving wp_delete_post in WordPress Core

Improving wp_delete_post in WordPress Core

One of the common processes that runs in Store Locator Plus is deleting locations.    For sites with a few dozen locations the process runs smoothly.  For sites with thousands of locations but deleting one or two at a time, not a big deal.   But for sites that are deleting tens-of-thousands of locations at a time the process becomes painfully slow.   A mere 2,500 locations can take up to a full minute to be removed on a fairly … Continue reading “Improving wp_delete_post in WordPress Core”

Posted on December 15, 2017Categories PHP, Programming, Programming Languages, Technology, WordPressTags , , ,   Leave a comment on Should The WordPress PHP Version Be Updated?

Should The WordPress PHP Version Be Updated?

WordPress LOVES backwards compatibility as can be witnessed by the minimum-allowed WordPress PHP version remaining at 5.2.4 a decade after its end-of-life date.  It  may be  one of the reasons they have continued to garner market share.  Don’t require people to do anything to improve their site and they’ll wallow in complacency.  It makes sense.  Inertia is a big thing to overcome.  If you are a business focused on writing content, selling widgets, or doing just about anything else other than … Continue reading “Should The WordPress PHP Version Be Updated?”

Posted on December 4, 2017Categories PHP, Programming, Programming Languages, WordPressTags , , , , , ,   Leave a comment on wp_enqueue_scripts Deep Dive

wp_enqueue_scripts Deep Dive

While trying to figure out why the footer-loaded scripts in Store Locator Plus are not being output on some admin page, I went deep down the rabbit hole of the WordPress wp_enqueue_scripts function.   Here are my notes from an analysis of WordPress (5.0-alpha-42191) . wp_enqueue_scripts /Users/lancecleveland/vagrant-local/www/wpslp/public_html/wp-includes/functions.wp-scripts.php This is a PHP inline function. /** * Enqueue a script. * * Registers the script if $src provided (does NOT overwrite), and enqueues it. * * @see WP_Dependencies::add() * @see WP_Dependencies::add_data() * @see … Continue reading “wp_enqueue_scripts Deep Dive”

Posted on September 21, 2017Categories Databases, PHP, Technology, WordPressTags , , ,   Leave a comment on WordPress 4.8.2 Data Query Woes

WordPress 4.8.2 Data Query Woes

Millions of websites across the Internet were automatically updated to WordPress 4.8.2 yesterday.    Thousands of those sites have key components that are no longer working.   Many of those sites will be looking for new plugins and themes unless new patches are made to make those themes and plugins 4.8.2 compatible.   WordPress 4.8.2 Data Query WoesWordPress 4.8.2 Data Query WoesWordPress 4.8.2 Data Query Woesn the meantime there are going to be a lot more partially broken websites online … Continue reading “WordPress 4.8.2 Data Query Woes”

Posted on August 17, 2017Categories Development, PHP, Programming Languages, Technology, Uncategorized, WordPressTags , , , , , ,   Leave a comment on PHP Autoload and Singleton(ish) Model

PHP Autoload and Singleton(ish) Model

Once every couple of years I take a month off from hacking away at the Store Locator Plus products and delve into some personal projects.  It is a way to learn some new things and try out new techniques without breaking the locator product.   With the locator being my primary source of income these days it is important to keep that intact while “trying new things”. Some of the things I’ve been working on this week include Backbone, Bootstrap, … Continue reading “PHP Autoload and Singleton(ish) Model”