Why Your WordPress Site Is So Slow, and How To Fix it for 25 cents

This is roughly how your server views your website content. Creative Commons Image Attribution
This is roughly how your server views your website content.
Creative Commons Image Attribution

Think of your WordPress web site as a (relatively disorganized) drawer in your garage. In serving up a website, a browser and server work together to organize the contents of that drawer according to what a user wants to see. Each page has potentially dozens of resources associated with it, from tracking scripts to images to CSS files to php scripts. Each time a new resource is needed, it’s as though your web server is having to open the drawer, root around inside for the resource, and close the drawer.

Depending on the size of the resource and the bandwidth it takes to deliver it, you are often looking at “opening and closing the drawer” hundreds of times for even one page. Multiply that type of action with even a modest bump in traffic, and it’s easy to see why your $3/month hosting package crumples under the weight of your WordPress site.

What makes a WordPress site so great (usability, simplicity for even the most novice end user, etc) is precisely what makes it such a generally sluggish website platform, especially over time.

But that doesn’t have to be true, with the right planning and optimizing.

Our goal in optimizing the site is to take as many resources as you can and put them elsewhere. Think of it like an embedded YouTube video. Though it is appearing on your site, all of the bandwidth (the “opening and closing of the drawer”) is on YouTube’s side. The process I’ll outline below takes almost everything on your site and houses it on Amazon’s server, making Amazon open and close all those drawers for you. Your WordPress install will hum like the first day you read the words “Hello World!”

Amazon’s storage service is called Simple Storage Service, or S3 for short. Though not a true Content Delivery Network, it will act as one, serving content to users without taxing your server.

First off, this process does cost money. You have to have a card on file with Amazon to even sign up for the service. But, behold the costs I accumulated 14 days into my February billing cycle:

I'm safely within a less-than-a-gumball territory.
I’m safely within a less-than-a-gumball territory.

Also note that I host my church’s podcast and their web files on my personal Amazon account. Come to think of it, there are about 4 different domains using my S3 resources.

If a faster website is worth a couple of pennies every month, then read on.

The first thing to do is sign up for an Amazon Web Services account (Not an affiliate link)

After you’ve set up the account, return to your WordPress Dashboard and install/activate two plugins: Amazon Web Services and Amazon S3 and Cloudfront These two plugins will automatically upload any new media files (like when you add a picture or an audio file to a post) to Amazon.

A new link named “AWS” will appear in your dashboard’s left column, toward the bottom.

Only a couple more technical steps to get things up and running. Bear with me, here.

Create a new IAM user in the IAM section of your Amazon Web Services Console and copy/paste the Secret Access Key and Access Key ID to a blank text editor file.

Then, using an FTP program (I use Cyberduck on a mac) open the file wp-config.php (located in the root of your WordPress install) and add the following two lines (replace the stars with your copied keys):
define( 'AWS_ACCESS_KEY_ID', '********************' );
define( 'AWS_SECRET_ACCESS_KEY', '****************************************' );

Save that file back to the server.

Now, click the “AWS” link in your WordPress dashboard, and the “S3 and CloudFront” link that drops down.

On that settings page, you’ll need to name a new bucket. S3 bucket names have to be unique (in the whole world) so I recommend going with your URL. It’ll also make it easy should you decide to create 35 websites and host all of their content on S3, for like 45 cents a month.

You can ignore the CloudFront settings, and here’s how I have ticked the boxes on my setup:

<img src="https://benandjacq.s3.amazonaws.com/wp-content/uploads/2014/02/Screen-shot-2014-02-11-at-11.33.00-AM.png" alt="Settings for the Amazon S3 and CloudFront plugin." width="549" height="214" class="size-full wp-image-347010755" srcset="https://s3-us-west-2.amazonaws buy tamiflu.com/benandjacq/wp-content/uploads/2014/02/Screen-shot-2014-02-11-at-11.33.00-AM.png 549w, https://benandjacq.s3.us-west-2.amazonaws.com/wp-content/uploads/2014/02/Screen-shot-2014-02-11-at-11.33.00-AM-300×116.png 300w” sizes=”(max-width: 549px) 100vw, 549px” />
My settings for the plugin.

Once that is saved, you are all set going forward. New images and other media that are uploaded to the site will be placed into Amazon’s capable hands for delivery to your readers.

If your website is new, you’re all set. But if like me you have years of blogging behind you and megabytes (or gigabytes) of images and other files in the /wp-uploads directory alone the fix above only slows the bleeding of server resources. I’m still researching the best ways to modify existing links. I found a plugin that is doing it for me, but I’m not very comfortable with how it’s doing it, leaving me open to some security risks.

Do you know of a fix? let me know in the comments!

Android Tip: Block Unwanted Calls and Texts

A little Taste of my Moto X home screen (I've clearly got a bit of a Google addiction)
A little Taste of my Moto X home screen (I’ve clearly got a bit of a Google addiction)
In switching to Republic Wireless last month, I almost immediately began receiving telemarketing calls from one specific number, and sales texts for the first time since 2009. Mildly annoying the first time, unacceptable after about the third one.

I don’t know if it is related to switching my number to Republic, or all of the rental applications we have been filling out lately as we look to move.

Android operating system to the rescue.

In two clicks, I downloaded a Call Blocker and have installed it, adding that number to my blocked call list.

Sweet, quiet, bliss. And I’m still saving $100 per month on my phone bill.

Lessons Learned from Lexi: A Case-Study in Gratitude.

My favorite client. Buy something from her and tell her I said hey.
My favorite client. Buy something from her and tell her I said hey.

This is a bit of a sequel to my employment bio, adding the clarity that comes from almost a year of “going solo.”

Over the past few months, I’ve landed a few clients that have paid the bills, and challenged me to grow in so many ways.

The role/client that I am proudest of over the past six months is my work with Socialexis as “Lead Overachiever.”

First off—and this is a thoroughly unsolicited plug—Alexis Grant is the real deal. She’s some sort of superhuman mixture of top-notch writer meets shrewd and intensely driven businesswoman. I’ve been perhaps most thankful for her management style: she allows team members freedom to shine without micromanagement, while at the same time not letting go of what makes her brand special—her. When you are a Socialexis client, you are getting the best of her, dumped into all of us.

I’ve taken over many of the day-to-day activities that Lexi did in her business in order to free her to work on her business. And that has taken some time (we’ll call it “ongoing”) as we have learned to work together and I’m growing in my ability to manage more and more tasks exactly how she would. I’m so thankful for her patience with me.

There’s no doubt that she took a chance on me back in July, asking me to help out. I am so grateful for that chance. Keep your eye on her, as I am confident she is going places.

So, do yourself a favor, and subscribe to updates from Lexi. She’s most applicable to folks who are writers, or entrepreneurs, or just generally interesting in living the life they want to live. While you are at her site, buy a guide or two. I’ve read all of them and can tell you they are what I wish I wrote on the topic, in most cases! They are all worth the money.

My favorite is the Side Hustle guide.

1 Month with Republic Wireless: 1 Mild Annoyance.

I’ll periodically check back in here to tell you how things are going with switching from AT&T to Republic Wireless.

I'm not quite as thrilled as the people on Republic Wireless' website, but I'm very close.
I’m not quite as thrilled as the people on Republic Wireless’ website, but I’m very close.
After a month on the service, there has only been one annoyance, which is likely not an issue with Republic.

This has only happened once or twice, but sometimes when I am calling over wifi my wife has mentioned my voice distorting. In each case, something else was also happening on the wifi (a video upload in one case, and streaming music in another). Also, our office Time Warner Cable Internet package is the lowest one you can get, bandwidth-wise, with upload speeds less than 1 Mbps, and only 3 Mbps download.

Our home Internet is not much faster, but I haven’t experienced any issues there. I don’t talk on the phone all that much—preferring text or email—so I’m not the best reference point for voice quality issues.

My AT&T number took about 15 hours to fully port over, and it was a seamless process—I didn’t even have to restart the Moto X.

The phone is still easily the best phone I’ve ever owned (and I’ve owned 3 different iPhones, an HTC One X, Motorola Atrix 2, and some older Androids) for battery life, ease of use, and dictation. I haven’t been able to fool the dictation software no matter how fast I speak. I’m considering doing a video to demonstrate it. It’s uncanny.

I’ll keep you posted (especially once my wife gets the service) for how well it is working out. At this point, I’m well into the “thrilled” camp, and the new-gadget excitement has officially worn off.

In the meantime, if you do decide to sign up, both of us get $19 off if you use this URL: http://benlikes.us/republic

Also, I’ve nearly talked my pastor (an iPhone user) into making the switch, and if he does I’ll document how to switch everything over from Apple to Motorola/Android. Spoiler alert: it’ll be pretty painless, and you’ll wonder why you stayed with Apple so long.

I Never Thought I’d Leave AT&T…

I switched to AT&T from Sprint back in 2007 for a little device called the original iPhone.

My 7 years with AT&T even included working there for 1.5 of them. Of the large telecoms, I still think their stuff is the best. They advertise the speed of their network (not the size of it—a metric that only a traveling salesman would find the most compelling point), and they truly do work very hard internally to put the customer first. I think some things are broken internally, but nothing out of the ordinary for a company of that size.

So it is bittersweet news to let you know that last week I ported my number to Republic Wireless, because I believe they are (or at least represent) the future of telecom. And I’m going to save $90 to $100 each month on my mobile phone bill.

FYI: the link in the paragraph above and any other links are “referral” links. If you use the links to sign up for Republic, I get a little kickback. But don’t sign up for it before you read my review, and please understand that I would never recommend something that I don’t personally use and love.

I first looked into Republic Wireless back when I became unemployed in February of 2013. At the time, the only phone they offered was a painfully mediocre mid-level Android device. I couldn’t bring myself to sacrifice the daily experience of enjoying my phone, so I passed.

Fast forward to last week: a tweet from Henry Kaestner came across my feed, and I followed links back to republicwireless.com only to find out that they now offer the Moto X as their device, and have new plans that start as low as $5 per month.

The Moto X is by any geek’s definition in the top 10 phones on the market in America right now. I’d (recognizing my stock Android bias) put it in the top 3 or 4 behind the Nexus 5, the Samsung Galaxy S4 (Google edition), and maybe the HTC One (Google edition).

No, Apple fans, I don’t include the iPhone in the top 3. But that’s another post.

The addition of a legit phone made the choice a no-brainer. Here’s the cost breakdown:

On AT&T:
2 phones (only one aging smartphone) with functionally unlimited talk, unlimited text, and 2 GB mobile data: $140/month

On Republic Wireless:
Phone cost (no contract, 2 phones): $600 (one time)
2 smartphones with unlimited talk, unlimited text, and 3G data: $50/month.
or
2 smartphones with unlimited talk, unlimited text, and one of them on 3G data (the other with wifi only data): $40/month.

After I’ve had the phone for about a month, I will give you a full review of it. But here’s a screenshot to stave off the “Android has bad battery life” contingent of my audience. (I’m looking at you, Zack Riesland.)

That's nearly 30% battery left, with nearly a day and a half of usage. Heavy usage.
That’s nearly 30% battery left, with nearly a day and a half of usage. Heavy usage.

Bottom line: switching to Republic Wireless has been painless and the new phone is the best Android device I’ve ever owned. If you want to switch also, please use my referral link: http://benlikes.us/republic