Ubuntu 14.04 LEMPH Stack

The next LTS version of Ubuntu named Trusty Tahr was released last May. Servers I’ve upgraded to this release have been running without issues other than HHVM crashing every once in a while. I’ve since replaced HHVM with the standard PHP-FPM stack running PHP 5.6 resulting in nearly identical performance with added stability. MariaDB 10.0.x…

WordPress without Apache Dir

A simple htaccess to run Apache without the dir module. Specific versions of Apache 2.4.x contained issues when using the dir module with some htaccess rules. However, this didn’t resolve all issues I was having with Apache 2.4 and WordPress. Multisite WordPress support may not be fully supported with this example. # BEGIN WordPress RewriteEngine…

Memory Compression Settings in OSX 10.9

After updating OS X to Mavericks, I noticed context switching between large applications, or having large applications running in the background was significantly slower on the MacBook Air with 4GB of system memory. Enhanced support for memory compression was added in the update, which many sites reported to yield an overall system performance benefit. Searching…

Using the IMDb dataset for testing MySQL performance

I wanted a nice sized database for testing MySQL performance optimization techniques. I found that the full IMDb database can be downloaded using a Python script named IMDbPY.py Simple install on Debian / Ubuntu: sudo apt-get install python-imdbpy Download the imdby2sql script from here: http://sourceforge.net/p/imdbpy/code/ci/default/tree/bin/imdbpy2sql.py Download plain text data files from: ftp://ftp.fu-berlin.de/pub/misc/movies/database/ Additional mirrors: http://www.imdb.com/interfaces/…

Parse URL parameters using JavaScript

I recently found myself in a situation where I had very limited access to remote content and needed to perform specific actions conditionally. I wanted a quick and clean way to parse URL query parameters inline. var vars = {};   window.location.search.replace(/(?:^\??|&)([^&=]*)=?([^&]*)/g, function(i, j, k) { if (j) vars[j] = k; }); Given the URL:…

Add taxonomy terms to WordPress posts

Using core WordPress functions is ideal when possible for modifying any content. However, when you have hundreds of thousands of posts, updating post content such as taxonomy terms on many items at once can be quite slow. Use SQL statements to quickly update your content only if you know you aren’t going to need any…

Dovecot on Ubuntu 12.04

Having a local mail daemon is great for development and debugging without having to waste resources or depend on external configurations. Dovecot is a simple mail server for IMAP and POP support. Postfix is the established standard for Linux mail server support. apt-get install postfix apt-get install dovecot-postfix Installs: dovecot-core dovecot-imapd dovecot-managesieved dovecot-pop3d dovecot-sieve mail-stack-delivery…

ImageMagick 3.1.0 with WordPress 3.4.1

I installed ImageMagick for fun on a site I am building to see what differences it would make.  The image quality of resized thumbnails was drastically improved and immediately noticeable.  As expected, CPU utilization during image resizing was significantly higher, but I think it’s totally worth it! Installing the ImageMagick PHP module on Ubuntu Server 12.04 64-bit was super…

Updated Server

WordPress 3.4.1 has been installed with the following components: Ubuntu Server 12.04 AMI Nginx 1.2.1 config PHP-FPM 5.3.10 phpinfo() MariaDB 5.5.25