3 EPIC WordPress Speed Hacks

October 25, 2008 — 23 Comments

I’m a speed-junkie.

I find this post so appropriate too because I watched “Top Gun” this afternoon as I rested from my mid-term-25-paper-nightmare.

I feel the need for speed.

I was the guy who bought the brand new computer and instantly reformatted, custom-partitioned, and hacked my registry for maximum speed (wait… I still do this…).  If my computer could go faster, I would make sure it would.

The same goes for WordPress.  So here are three of my favorite WordPress speed “hacks” that are SUPER easy to implement and so effective that if you aren’t using them (or decide not to use them) I will call you a n00b.

And, if you aren’t using WordPress, you are a n00b by default.  Just kidding…  Hacks after the jump.

First, these aren’t really hacks, but for all intents and purposes this might be the first time you’ve actually edited any code that wasn’t a part of your plugins or themes, so we’ll call it a “hack” for fun.  That way you can feel cool.

Super Duper Speedy Object Cache Thingamajig

The first is a super simple addition to your wp-config.php file located on the root of your WordPress install.  All you have to do is add 1 line of code to enable WordPress’ built-in Object Cache.

What does it do?  It’ll make WP cache all types and kinds of database queries as files on the server’s hard drive.  Essentially, this is something like asking the server to microwave that delicious hot-pocket instead of asking the server to make the hot-pocket from scratch with homemade ingredients.  … Don’t get it?  Your making the server do less work.

So, copy the following code into your wp-config.php file and voila, instant speed upgrade!

// Enable the WordPress Object Cache:
define(ENABLE_CACHE, true);

Some have noted speed and performance increases that would make a grown man cry.

Super Duper Speedy WP Super Cache Plugin Thingamajiggy

This one is pretty much legendary.  It’s a “plugin” but it soooooooooo much more than just a “plugin”.  The WP Super Cache Plugin makes your WordPress “Ford Focus” install into a “Lamborgini Murcielago” install.

The results and it’s kick-buttness have been well documented so I won’t spend any more time giving it praise, but there are a few issues that you may encounter before and/or during the installation process.

You might have to do the following to get it to work, and WP Super Cache will actually document these changes that you’ll have to make so you can get it to work optimally:

  1. You may have to add additional lines to your wp-config.php file (but you’re already a pro if you did the first hack).
  2. You may have to chmod your root directory and/or the wp-content folder to 777 while you install and setup the plugin.  This is pretty easy and any GUI-based FTP program (or internet browser-based GUI) should give you the ability to do this.
  3. You may have to create and/or move a file or two around in the directories (that’s easy).
  4. You will probably have to enable some type of “permalink” setting, which is easy (goto your WordPress Settings >>> Permalinks >>> Choose Style).
  5. You will want to check your .htaccess file on the root of your WordPress install after you enable addition mod_rewrite in the WP Super Cache settings.  The .htaccess file is already created if you have “permalinks” setup.  Checking it is easy as downloading the .htaccess file and opening it in a text-editor after you set it up in WP Super Cache.

And voila.  Pretty much teh uber.  A must plugin.  You owe it to your readers.

Super Duper Optimize Your Dbase Thingamajigjig

This one’s pretty simple but requires you to do a thing or two on your MySQL database.  It’s easy though, especially if you’re using PhpMyAdmin.  Just 3 clicks and you’re “optimized” for speed.

Get into your admin control panel for your database, click the right one, scroll all the way down and hit “check all” and then goto the right and use the drop down box to choose “optimize tables”.

That’s it!  Pretty sweet, huh.  Here’s a visual overview of the amazing 3-click-wonder.

So there you have it.

Three of my most favorite speed hacks for WordPress.  There are probably 10 others that I’ve done to increase speed, stability, and performance, but they require a little more “know how” and may result in you regretting your attempt…  but these three won’t.

Do it, and I promise that it’ll make you smile… and please let me know how it goes!  I like hearing good news.

John

Posts Twitter Facebook

I'm passionate about startups, blogging, and human capital. I love what I do and who I get to work with. I am incredibly blessed.


23 responses to 3 EPIC WordPress Speed Hacks

  1. John:

    Cool. But what if I'm pulling ~300 views on a *good* week? Aren't these hacks irrelevant?

    I'm no Carlos Whitaker, if you know what I mean.

    peace|dewde

  2. Haha. Great point… but, to which I would reply… “So……….?!? Making my computer faster for video games helps out with basic word processing too…!”

    :)

  3. Hmmm. Interesting. I've looked at wordpress and it seems like a much better platform than what I'm using now, which is blogger. I just recently purchased my domain name from blogger and since, it has been more difficult to use. For instance, I have to go to 3 different sites to “manage” my site. FRUSTERATING!

    I just don't know web page editing…. the only computer language I know is English! lol.

  4. wordpress is super easy to use and manage… and even for the complete code-illiterate, editing some template files for customization is a breeze. i'd love to help you out with a migration if you need it…

    that's how much i love it!

  5. Crikey, so I suppose that if I use WordPress but still have them hosting my blog I'm a complete n00b as well? Haha.
    Well, I'm hoping to make the switch over Christmas break :)

  6. Keep us posted! if you need any help, let me know!

  7. Hey John, I just ran those tips, and they were awesome. However, I noticed that my sidebar, that normally sits at the top of the page, now hangs out towards the bottom. Sadly, I'm not enough of a nerd to know what I did. My thoughts are that I did something within the “.htaccess” file (I didn't actually have one until I tried your tips) that caused my sidebar code to freak out, but again, I'm not really sure. Any thoughts?

    Thanks.

  8. the .htaccess wouldn't have affected the sidebar… i'd have to see if anything else is amiss. but, as i mentioned, what you may see after the cache-effect occurs is not necessarily what other users will see.

    is the sidebar code “standard” or hacked together? using widgets?

  9. I've never messed with the sidebar code, but I am using widgets; most of them after-market.

  10. WOW! This is fantastic! Such a simple way to get lots of speed!

    I'm taking a leap of faith and trust you know what you're doing when you suggest enabling WordPress object cache, activating WP Super Cache plugin, and optimizing database tables.

    Thank you, thank you, thank you!

  11. Remember as well that there are some pretty basic things web designers can do to speed up WordPress. Simply removing a PHP call to fetch the current year can have a dramatic impact if you're experiencing hundreds of pages an hour. I wrote a piece on making wordpress faster a while back that provides some advice for new blog owners.

  12. links broke.. but yah, definitely! i try to make it as easy as possible with little code… but these hacks do require some…

  13. dude. your cool points just got ++ b/c of your relation to the forrester guy. :) but, you were cool to begin with.

  14. Thanks for posting these. I'm more of a designer than a web developer/ programer. I'm using WordPress as a CMS for my Church's website. These tips have sped the site up BIG TIME! Here's the website for the church that WordPress is the CMS: http://www.graceoutreachcenter.org

  15. omg!this is awesome.

  16. I has doing follwow this but i cannot get more speend on my blog. I think maybe my theme is slow.
    Just ask a more question about speed. If 1 theme put very much php code and 1 theme put single html code. Which one is speed up greater than?

  17. ever since following No. 2 I can no longer access my site. I get an error message:

    Warning: Cannot modify header information – headers already sent by (output started at /xx/xx/public_html/xx/wp-config.php:64) in /home/xx/public_html/xx/wp-includes/pluggable.php on line 850

    The config file ends at line 62 so is nothing on line 64 and line 850 in pluggable.php refers to:

    if ( $is_IIS ) {
    header("Refresh: 0;url=$location");
    } else {
    if ( php_sapi_name() != 'cgi-fcgi' )
    status_header($status); // This causes problems on IIS and some FastCGI setups
    header("Location: $location");

    Regretting this big time. Any advise as to what has happened?!

  18. @cazza,

    Hope you figured this out already. You probably have 1 extra line of "whitespace" at the end of your wp-config.php file.

    open it. go to the very end. "backspace" until you get to "?>"

    now save it. Fix.

Trackbacks and Pingbacks:

  1. Nerdability at theschu.net - October 31, 2008

    [...] trouble with the blog design. It all started this morning when I grabbed some code from a certain site, telling me how to improve the load time for the website. I installed all the tricks, and noticed [...]

  2. Wordpress Speed Hacks - Go Top Gun - ChurchCrunch - January 17, 2009

    [...] You can find the post here at Epic WordPress Speed Hacks . [...]

  3. Meet Your Commenters Plugin is Absolutely Essential - ChurchCrunch - January 17, 2009

    [...] there are a number of extremely nice-to-have plugins for WordPress, more than a few speed hacks that one should definitely consider using, and certainly some much needed community-related plugins to increase discussion and community, [...]

  4. Add a DISQUS-ion to Your Blog - ChurchCrunch - January 17, 2009

    [...] of you may have read my post relating 3 EPIC WordPress Speed Hacks that I use on both ChurchCrunch and [...]

Leave a Reply