Trim the Bloat: An Introduction to Keeping WordPress Lean

As I explained in the last post, the web is rapidly being filled with sites that are too big for their own good. That is to say that in many cases, optimization is an afterthought. 

Because of this we're now stuck using sites with an enormous number of assets like scripts, stylesheets, web fonts and images. We shouldn't settle for this, and as always, a better world – or web in this case – starts on our own servers.

In this post, I will detail some of the more important aspects of creating a website and aim help you avoid making some of the most common mistakes.

Make the Right Choices

Whether you have an existing site or are intending to build a new one, it's always important to have a clear vision of where your site is headed and what you are planning to do with it. 

For example, you may want to add some features to your existing site, but have you thought about what this really entails?

Let's say you want to add a banner slider to your site. It's easy enough to do, right? Just find a plugin and voila! Instant gratification; however, did you notice that banner slider just added a stylesheet, web font, and two scripts to your site? 

Also, did you notice that your other plugin - you know, the one that adds the social buttons to your posts - added a stylesheet and script, as well? Installing a plugin is fast and easy, but you're likely slowing down your site every time you add one.

So let's think more carefully about the various bells and whistles we add to to our WordPress installations, shall we?

One of the most important things to do before you do anything is spend some time thinking about what it is you want to do. 

For example, let's say that you want to add a banner to your homepage - awesome. I love banners. But if you're going to do that, then aim to do it the right way. Look for the one that best fits your needs and continues to keep its footprint small. The fewer assets a plugin adds to your site, the faster your site will perform. 

In this example, I used a plugin, but the very same of course applies to using a theme, be it free or paid. Generally, the more “premium” a theme is the more features it will have and while features are awesome they do have overhead, and overhead is what will slow your site down.

Use What You Need

Instead of just blatantly installing every plugin you can find, perhaps you should spend some time thinking about what they do for your site.

In doing this, there's a chance that you'll find that better choices can be made. I'm not saying don't use plugins, or don't use insert your plugin here. Instead, I'm saying to think about a plugin before you click on "Install." 

Don't just add them because they add a small improvement to your site, they might do more harm than they provide gain.

Less Is More

It's a popular catchphrase, “Less is more”, but these things don't become popular for no reason. We want less bulk in our website: Less time spent downloading images, less code, fewer files, less of everything. 

Ideally, want want as lean a site as possible such that we have the performance and functionality that we want with as few additions that are required. The thing is, it will take time to get this right, but in the long run, it's worth it. Every kilobyte you can shave off is one less that needs to be transferred.

So remember: make the right choices. Focus on figuring out if you really need that plugin or feature. Think about what you can do to avoid adding it to your site in a way that adds to your overhead in a large way. Think about adding the feature right into your theme, or building a plugin that will do exactly what you need it to and nothing more.

In the next post, I'll cover some tips on how you can clean an existing theme and cut away some of its bloat.



Related Articles