Speeding up your WordPress site is not as difficult as you might think, but it can cause some hair pulling if you don’t know how to do it. If you check your site with Google PageSpeed Insights, you will probably get a lot of frustrating useful messages that can be a bit difficult to understand, especially if you are using a couple of plugins as well.

In this article will I show you how I optimized my site and converted to SSL (https) for a faster, more secure and SEO-friendly site.

When I optimized my site and converted to SSL recently, I had to search for solutions, but in every case, there was too much compromise or vague information. I want to use certain plugins (like WooCommerce and more), and the site must be user-friendly without sacrificing the looks and credibility.

After some of late night’s work, I was able to get load times between 0.3 and 2 seconds. I got 94/100 (mobile) and 96/100 (computer) on Google PageSpeed Insights. Important! Google now have a mobile usability test in their Webmaster Tools, so the page speed test might not be so relevant shortly).

My pages are now much faster and more user-friendly. The problem with keeping page speed as quick as possible all the time is that it require some work and attention. Every time you do changes on your site, you must keep in mind that it might affect your page speed. You may also want to install some new plugins, or maybe a new theme. All this will have an impact your page speed.

The reason it took so long to improve my site was that I had to do a lot of Googling, which lead to lots of trial and error. This article is somewhat long, but if you follow all the steps, you should be able to make your site considerably faster if you don’t have done any optimization yet.

Why is page speed so Important?

So, first things first! Page speed is important because your visitors will leave after a couple of seconds and your Google ranking will suffer. It’s as simple as that.

Why do I need SSL?

SSL will increase security, and it’s good for your search engine rankings, as Google now has this as a ranking criterium. I also read somewhere that Google Chrome soon will label sites not using SSL as insecure. HTTPS will become the new standard, and now that Let’s Encrypt are providing free SSL for everyone it’s getting easier to adapt. Using https will also gain visitor trust, so there are no reasons not to change. If you run a web shop, you definitely should upgrade asap.

However, page speed is not a magic key to rank well in search engines; your site must also provide good and useful content to be able to rank well.

Is this the perfect solution?

No, there are compromises, and there are unfortunately no solutions that will work for everyone. However, I think this will work very well for many website owners with smaller sites on shared hosting. You will also increase security quite a bit due to the SSL upgrade. In addition to hosting, I recommend a Cloudflare subscription. I will get more into this soon.


The most common hosting for smaller sites is shared hosting. Shared hosting means that there are many sites (often too many) hosted on one server. Traffic to the other sites hosted on the server will affect the performance on your site as well. That’s the price you pay for cheap hosting. However, since most smaller sites use shared hosting I use this as an example in this article, but the same applies to sites on VPS or dedicated servers.

I have tried a lot of web hosting solutions over the years, which many of them were not very good. Now I use Siteground, which I think is a good solution for smaller sites. They offer a lot of nice easy to use features which are important for page speed optimization. They are also very transparent (open support forum) and provide good support. Keep in mind that other services can be just as good but make sure you do some research before you chose a web hosting service.

You don’t have to use Siteground, but this article relies on some of the features they offer so make sure your host have the same (or similar) features. Also, note that I don’t use their cheapest option. Here are some nice easy-to-use features Siteground offers to improve your website with a few clicks:

  • SuperCacher with Memcache option
  • Free SSL with Let’s encrypt
  • CDN Cloudflare integration

The great thing about this is that its plug and play. I use all of these features, but remember that you need a paid Cloudflare subscription if you want to use SSL together with Cloudflare.

You can find all these features in the Cpanel, so if you already use another host, you ought to check if you can find them there. You can also ask if your hosting contains these features.

The first thing you must do is to activate the super cache option in our Cpanel. Then you must download the plugin (which you will find there as well). Activate all three levels (static cache, dynamic cache, and Memcached). Next, go back to your Cpanel and enable CloudFlare (You must use Plus if you want to use SSL, which I highly recommend).

To activate SSL, you must scroll down in your Cpanel and activate Let’s encrypt under the security tab and follow these steps. If you don’t want to install SSL you can skip these steps:

  1. ¬†Change your site URL from HTTP to HTTPS under the Settings–>General tab in your WordPress Admin.
  2. Redirect HTTP to https by adding the following code to your .htaccess (in your WordPress root directory)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R=301,L]

Themes, plugins, and images

To get the green numbers on Google PageSpeed Insights and fast loading times you must use a lightweight theme with minimal clutter, and you might have to leave some plugins out. Images and how you structure your content is also an important factor to speed up things and make your content more user-friendly.

Some general rules:

One of the most important rules in Webdesign is not what you can add to your site, but what you can leave out. Before you add a new feature or plugin, you should ask yourself if it offers any real value to your visitors. Web design is not about eye candy, but that does not mean that the layout doesn’t matter. Text size, fonts, white space, visual approach, and so on are important factors to gain trust and make your site look professional.

Most modern sites use a lot of javascript, which can have an adverse impact on your page speed. The solution to this is to load javascript and CSS asynchronously at the bottom of your page. The idea is to load the content of the site first instead of letting the user wait for all the javascript and CSS to load before the content renders.

Which Theme Should I Use?

A good WordPress theme is critical for page speed and usability. Themeforest is probably the most popular source for WordPress Themes today, and many of them look amazing. The problem is that features and looks get prioritized because that’s what’s selling. There are some themes out there that focus strictly on speed, but I feel that many of them are too lightweight regarding usability, or does not look good. I want a theme that is fast, beautiful and makes Woocommerce look nice and clean, so I built the DieterPress Theme (which you are viewing right now).

The DieterPress theme works out of the box with Woocommerce, and with a good content structure and optimized images, it gets 94/100 on both mobile and website on the Google Pagespeed test (and that is on shared hosting as well). I also made a nice shortcode plugin to help you create beautiful pages and articles.

I will make this theme and plugin available to buy very soon.


In the root of your WordPress structure, you will find a file called .htaccess. We must add some small code snippets here to enable a couple of features.

  • Gzip compression
  • Redirect HTTP requests (only if you use SSL. You already enabled this if you migrated to SSL)

Gzip compression:

mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*


Some useful free plugins can help us with a couple of things as well. You should try to keep the number of plugins you are using to an absolute minimum and always make sure to check your site if you install a new one,  this makes it much easier to identify problems. Always ask yourself if the plugin has any benefits for your users or improve your site in any other way that helps your visitors.

Also, remember that lots of plugins are just simple functions, which you easily can add in your functions.php file. Check out my WordPress category, and you might find some useful snippets.


Woocommerce contains a lot of CSS which may cause problems on Google Pagespeed Insights. I disabled all the Woocommerce CSS in the functions file and customized it completely to fit the DieterPress Theme.

Content Structure and images

Your content structure is essential for a good user experience, but it’s also important for SEO. Images should always come after written content.

Avoid Image sliders

Image sliders are still quite popular, but there is a reason you don’t see them on larger sites. Image sliders may look fancy, but they provide a horrible user experience. Most users want to find the content they are looking for quick and easy and could not care less about your shiny image slider with large images scrolling over your screen. In addition to the large image files, they often load with heavy JavaScripts which slow down your site considerably.

Optimize Your Images

Images are not a bad thing, and you should use images in your articles to provide a better user experience. Remember that you are creating content for humans, not search engines. However, you should optimize your images for both speed and user experience.

Compress all your images as much as possible without decreasing quality too much. Also, consider using simple illustrations in png over jpeg images. These can save you loads of kilobytes. Here are some excellent tips to get the most out of your images:

  • Optimize images before you upload.
  • Use correct size, don’t downsize with CSS.
  • Use images with a white background for smaller file size.
  • Images with fewer details are usually smaller than images with lots of details.
  • Black and white images are often smaller than color images.
  • Consider using light weight PNG illustrations with few colors if possible
  • Activate lossless image compression at CloudFlare if you use their service

Here is an example:

The image below is optimized black and white and scaled down to the correct size in Photoshop. Image quality is 30, and all metadata is stripped out. The file size is only 36kb. If you are a photographer, you might want better quality, but for article images, you ought to optimze more.

Wet Plate Collodion Article Image

Featured Article Images

For example; if you write an article and use a featured image you should not display the picture as the first thing in your story. Instead show the heading and an excerpt/intro first. Keep in mind: No rule without exception.

Pop-ups, sticky menus, and animations. Let’s learn from history

I created my first website in 2004, and it was amazingly satisfying to make a website from scratch using HTML. I think this was a time when the web became more “modern,” and web designers started to take user experience serious. Unfortunately, I believe the history is repeating, and we are going back to the 90’s in some areas. To avoid this let’s take a quick look at the history

At the end of the 90’s animated gifs and pop-ups were flying over the screen like crazy and flashing javascript menus looked like a disco. The more stuff you added to your site, the more “professional” it looked.

In 2004-2006 web designers started to think about user experience more seriously and they tried to eliminate as much javascript as possible to keep the site fast loading and clutter free. Javascript belonged to the 90’s and had no place in a modern site. Tech savvy users disabled javascript in their browsers to stop annoying content on old sites.

The new trend was to make fast loading semantic websites with content in focus. Content and layout should now be separate. The standard table based designs became outdated.

Javascript has evolved, and there is no doubt that Javascript is critical in modern Webdesign. Javascript can improve user experience dramatically, but unfortunately, it can also ruin it.

Pop-ups almost died out in 2005-2006, but then they started to come back in a more subtle way. Now, pop-ups are starting to get more aggressive and annoying again. I think this is an unfortunate trend.

Web designers are always excited about new toys in their toolbox, and it might be tempting to add some fancy shiny features just because it looks cool. Just because you have the tools to do something, does not mean you should.

Animation on websites may look fancy, but the truth is that your visitors just want your content as fast as possible. Javascript can increase the user experience dramatically if used cleverly, but don’t do something just because it looks fancy.

Unfortunately, animated GIF’s seems to be back. Stay away, don’t be tempted!