The recent announcement that Google has added site speed as a ranking factor has people running to find quick-fix solutions. Most people will drop a plugin or two into their WordPress install or follow a simple tutorial they found doing a quick search for “improving site speed” and assume that will get the job done. Yes, a simple way to increase your site-speed (especially with WordPress) is to use a caching plugin. What most people don’t think about is, as time goes on and your content expands and grows, it get’s harder and harder to maintain that initial speed burst these plugins will give you.
It’s not a race, it’s a marathon.
So how do you plan for content you haven’t even thought about yet? Well, you can’t. What you can do is lay a solid foundation so that when you do bring out the new stuff, it won’t cause a hiccup. It’s actually alot simpler to do this than people think and it all starts with how your site is coded.
Valid Code runs faster. It’s Science.
Your web browser is not a human. It can’t guess what you meant when you wrote <p.> instead of <p>. It can sometimes figure things out on it’s own and display things the right way, but you’re making it think. Web Browsers don’t like to think, they just want to do. Everytime a wrong or misplaced piece of code is parsed it takes just a little longer for that page to load. Sloppily written code will slow your site down. One or two incorrect lines may not mean much, In fact I doubt you’ll even notice it. The real harm comes when you get accustomed to writing messy and invalid code. One or two unclosed <img> tags won’t do much, but imagine what a couple hundred of them will do. If you learn to do it right from the very start, you won’t have to ever worry about it again.
Validate your code with W3C Markup Validator or Validator.nu.
An Extra Step will do your Images Good.
I love sites with tons of images. When done properly, it really makes the whole experience more interactive. When overdone though, it can bring your loading time to painful crawl. So what if you have a really image heavy site? How do you keep it from doing that unattractive 1980′s printer-like loading of your large images? Shrink ‘em ya dummy!
There are a few tools that make compressing images easier. Yes, they add an extra step to your process, but they can save seconds from your load time. I’ve cut as much as 80% of the file size of an image just by compressing it. Best part? You won’t even be able to tell a degradation in quality. That’s a win-win if you ask me.
Download and compress your images with ImageOptim (OS X only) or use the Smush It Plugin for WordPress.
Quit putting your database to work!
Everytime you add a chore to your database’s list of things to display, it’s going to take longer for it to get the job done. Be good to your database and it will be good to you. Any easy way to lighten it’s workload is to make it stop doing the mundane stuff no one likes doing anyway.
A happier WordPress Database in 2 simple steps
- Open your header file and replace all the <?php bloginfo(‘…’); ?> with your site’s actual information.
For example, change “<?php bloginfo(‘name’); ?>” to “My Site Name”. Do the same thing in the footer and any other area where the content isn’t dynamic. - Hardcode every link in your navigation (if you can). Do the same think for your footer links.
These may seem like common sense to some people, but alot of people forget that every single one of those <?php bloginfo(‘…’); ?> queries is another chore the database has to perform. You’re probably not going to be using this theme on another site so there’s really no reason to leave those in. Just ensure, that you’re directories won’t change!
I learned something today…
You can see how a few small things can really help clean up your code and make your site smoother. As time goes on, your files can get cluttered and messy. If you start doing it the right way now, when the content starts rolling in you’ll be in a much better position. There will be less broken elements, misplaced tags, and your code and database will perform better.

