How I Setup a WordPress Cron Job Using AWS Lambda

A little background on WordPress cron jobs and why they’re important. WordPress cron jobs is the tool that WordPress core uses to regularly run specific functions. For example, a widely used caching plugin, W3 Total Cache (which I use on many of my sites) can preload caches at regular intervals, to ensure that a page is always cached. WordPress by default though, triggers this when someone visits your site. This can cause a delay in loading the page though, if it takes a while for a job or jobs, to run. (more info: developer.wordpress.org) Personally, I disable the built-in WordPress …

Continue ReadingHow I Setup a WordPress Cron Job Using AWS Lambda

Using Cloudflare, an Amazon Load Balancer, with Nginx and Fail2Ban

I recently started using WordOps as the primary infrastructure solution for my WordPress sites. I’ve been quite happy with it as well. I’ve been using Cloudflare for quite a while now, and have been extremely pleased with the product offering; even the free service is fantastic — I have also used Cloudflare as an Enterprise customer. More recently though, I’ve started to dive into Amazon Web Services (AWS) and started using their Load Balancer technology in my high availability WordPress infrastructure configuration. WordOps comes out of the box with a configuration file called cloudflare.conf inside of /etc/nginx/conf.d. This file comes …

Continue ReadingUsing Cloudflare, an Amazon Load Balancer, with Nginx and Fail2Ban

How to Automate WordPress Backups to Amazon S3 with a Bash Script

I’ve been working with WordPress for almost 20 years now. Hosting has always been a pain in my side to properly handle scaling, caching, and delivery. Recently, I started using an Open Source product called WordOps and have been very impressed with it. The following WordPress backup script is tailored to the file structure of WordOps, but it can easily be customized to fit any need. To give you some basics of how I adapted this script. All my sites live in /var/www, such as /var/www/domain.com and furthermore, the main directories live in htdocs. For example, /var/www/domain.com/htdocs which is where …

Continue ReadingHow to Automate WordPress Backups to Amazon S3 with a Bash Script