Jesse Lawson

buy me a coffee ☕ / home / blog / tutorials / portfolio / contact

WordPress

Mar 30 2014 in Nginx/ WordPress/ sysadmin/
How to Backup WordPress on a Remote Server (and send it to Amazon S3) →

Let’s talk about backups.

When you are running your own WordPress hosting service, you need to ensure that your sites are backed up nightly. Unfortunately, the more sites you have on your server, the more processing power is required to do these backups, especially if there have been a lot of changes during the day.

The smartest way to proceed with nightly backups, then, is to offload the processing requirements to a separate, dedicated backup server, or just a secondary server that can afford to use a lot of its CPU in zipping, rsyncing, and uploading to the Amazon cloud.

Dec 20 2013 in sysadmin/ WordPress/
WP Engine Hotfix: Preventing Spam and Bad Bot Traffic, Part II →

In [Part I][1] of this WP Engine Hotfix, I discussed some of the theory behind WP Engine’s visitor calculations and how end-users of WP Engine could benefit from taking charge of their traffic themselves. In this next part, I’ll discuss ways to log your visitor traffic, scrub that traffic for blacklisted and abusive IPs (as well as employ a nifty contact form honeypot), and completely block access to your site by these harmful bots, scrapers, harvesters, and spammers that jack up your visitor count.

It’s important to note that this tutorial is not WP Engine specific. You can employ these methods on any hosting environment in which you have access to Apache. If you’re on Nginx, I’ll cover how to block unwanted traffic in a different tutorial.

Dec 18 2013 in sysadmin/ WordPress/
WP Engine Hotfix: Preventing Spam and Bad Bot Traffic, Part I →

WP Engine counts traffic from “bad” bots (like harvesters and spam bots) the same way it tracks human visitors. While some people have gone to great lengths to talk about how this has dissatisfied them to the point of leaving WP Engine, steps can be taken to take charge of your website’s defense and disallow these bots from ever making it to your pages. In this article, I discuss how to find out who is really visiting your blog (raw metrics), how to filter out the “bad” bot traffic, and (hopefully) reduce your visits in WP Engine’s algorithm.

Dec 1 2013 in webdev/ WordPress/
WordPress Asking for Local FTP Credentials on XAMPP Solved →

A few developers were asking why their localhost instances of WordPress were asking for FTP credentials when trying to install new plugins and themes. If you’re getting the dreaded “Please enter your FTP credentials” page and you’re running XAMPP for your local WP development environment, do not follow the popular StackOverflow answer that tells you to chown your wordpress folder to _www. Read more for the real fix.

Nov 30 2013 in MySQL/ sysadmin/ WordPress/
How to Find and Replace a String in MySQL →

One of the problems with moving your site from one domain to another is that the images in all your posts are still served from the old setup. In order to fix this, you need to run a simple MySQL command that will search through all your posts and replace the old URL with the new one.

Oct 28 2013 in WordPress/ sysadmin/
NGINX + WPMU + Non-WordPress Subdomains →

I’ve been trying to configure a subdomain on a WPMU install that runs on Nginx that is not part of the WPMU network and have ran into nothing but problems. In this post, I discuss some of the problems I ran into while trying to setup non-WordPress sub-domains alongside a WPMU sub-domain site and how I got both WP and non-WP sub-domains working and correctly configured in Nginx (hint: I didn’t).

Jun 24 2013 in webdev/ WordPress/
Custom Category Style in WordPress →

When I worked for an online newspaper, we put a customized header image at the top of every category page sort of like how NYTimes does it for their blog pages. These days, it’s a lot more attractive to use custom CSS styles for each category. In this tutorial, we’ll create a custom category style in WordPress so you can add your own CSS to pages belonging to a specific category.

Jun 24 2013 in webdev/ WordPress/
dropzone.js WordPress Integration Tutorial →

Over on the Hacks forum at WordPress.org, user Manwoll was looking for a way to add drag-and-drop functionality to a contact form in WordPress. Not a fan of commercial contact form products myself, I sought out a method of doing this that would most accomodate a theme developer who is working on a custom solution for a client. The solution involves using dropzone.js and some basic PHP, and the end-state is a fully-functioning drag-and-drop box on a WordPress page that uploads files straight to your WP uploads directory.