Tutorial: How to speed up WordPress
Fast loading websites have a lot of benefits: Designing WordPress for speed usually results in a higher customer satisfaction and better SEO results. Why? Because Google and surfers hate to wait for slow webpages to load.
Therefore it is generally a good idea to optimize your WordPress installation for faster page load times. During this tutorial I’ll guide you through the complete proceess on how to speed up wordpress. As a rule of thumb every page of your website should load in less than two seconds. Most pages of larger websites load within 1 to 2 seconds.
Unless you are using a larger WooCommerce installation within your WordPress site which typically loads a bit slower you should aim for the mentioned 1 to 2 seconds with two seconds being the maximum. Here are the main areas to think about:
Identify your bottom line first
Before you start optimizing your website for speed you should (edit: you must) identify your baseline. It`s really easy to identify your current page loading times. Head over to pingdom (https://tools.pingdom.com/ ) and type in the full URL (e.g. your http://www.domaint.tld) of your WordPress website. Choose the closest pingdom server and wait until the results are loaded. Pingdom will come up with several helpful information for you.
- The absolute time your page needed to load. Does your site need more than 2 seconds? Are you in the mentioned range of acceptable 1-2 seconds?
- Pingdom will also give you a percentage how many websites (in the world) are slower – and how many are faster.
- Further down the page you’ll find some helpful tips on improvement areas – like expiration settings or minification options (we’ll talk about it later on)
- There is an even more technical breakdown of every single piece of your analyzed page (a bit I similar to the developer tools you can plugin to chrome or firefox)
Of course you could even measure your personal load times if you like. You should repeat the bottom line assessment at least two or three times –ideally at different times of the day. Note your results down in writing.
Before you start speeding up your WordPress installation let me explain what slows down your website and what elements make it faster:
Choosing your plugins wisely
While a fresh WordPress install is usually pretty fast, page load time increase over time and making your visitors wait longer. The main cause for it: too many installed and activated plugins! Before adding another plugin to your WordPress blog you should rather considering not to us it. Though many plugins add valuable functions to your website every additional plugin slows down your site.
Your WordPress theme optimized for speed
Typically you choose your theme to realize your design ideas. Therefore a good theme should be a good fit for both your visitors and yourself as a WordPress administrator. The downside of it: like plugins you pay a price in performance lost when choosing a feature-heavy theme.
Especially commercial themes come with lots of features which you get used over time (and might think you can’t live without). For instance: The Newspaper Theme – which I use here at WordPress-expert.info – has lots of useful and sometimes adorable features. When it comes to page load times such a “monster” theme requires additional work like using a caching plugin to accomplish acceptable load times. Tipp: Even if you are not a WordPress developer – just count the file size of your desired WordPress theme. It is located underneath the wp-content/themes folder. Generally speaking less size in megabytes is equivalent to less code and will result in faster page load times.
A plugin to identify slow plugins
It may sound counter intuitive at first but there are a few good plugins that you may enable from time to time in order to identify the main performance blockers of your site. Plugins like plugin profiler (which is provided free by Goodady by the way – thanks guys) will give you a good understanding what your WordPress backend is doing and why. Important note: p3 profiler itself is rather a monster plugin in size. You only should use it for a few minutes or hours only until you find your performance hungry plugins. Please de-activate P3-profiler after you identified the main show-stoppers among your plugins.
Using cache for faster WordPress
When it comes to caching most people are a bit confused at first. Caching does several tasks at the same time. Depending on the caching mechanism this may take place at the webserver your WordPress sits on, inside WordPress itself or you may use a content delivery network (CDN).
- WordPress cache plugins aim to make speed up WordPress itself. We’ll talk about this in a minute. There are lots of caching plugins out there. We’ll also discuss how you can use a caching plugin later on.
- A content delivery network (CDN) is generally a good concept for almost any website. When using a CDN you place your static content like images on larger networks operated by Amazon, Rackspace or Onapp – just to name a few.
- Most likely your webhosting provider already added some features to your apache or nginx webserver to make the server itself faster. This may already include caching programs like varnish or some apache or nginx modules like mod_pagespeed
Using a caching plugin:
A reliable caching plugin can speed up your site dramatically. It reduces the amount of time consumed by the program by generating pure html-files and storing them. We’ll discuss this in an instance.
Using a CDN for your WordPress site
Using and implementing a CDN to offload images and other static content is beyond the scope of this article. Check out the other blog posts I wrote about how to use a cdn for WordPress.
Ask your webhosting provider
It is very likely that your webhosting provider already installed a couple of apache plugins to speed up the webserver itself. Some webhosting panels like cpanel or plesk have useful features bundled with the software. If you have file-access to your WordPress installation you might easily check what your webserver provides. Just copy a php-file containing the phpinfo() statement to your webserver and execute it. If you are non-developer you might simply install https://wordpress.org/plugins/wordpress-php-info/ and check its result. Look for memcached or mod_pagespeed with the given result page. If you find them – great. If not contact your webhost and ask their support staff what they are providing.
Choose a hosting plan for speed
Without going into much detail about how to choose the right hosting plan: Look for fast SSD storage for both your files and mysql-storage. Generally SSD (solid state disks) are much faster than conventional harddisks. There are tons of hosting services out there in the web – so just head over to Google and search for “Wordpress hosting” and make sure you check the testimonials on the webhosting company.
Your Roadmap to speed up WordPress:
As soon as you know your bottom line – let’s break down your page load times in detail: Install P3 Performance Profiler and activate the plugin. Click on the settings page of P3-Profiler and start a scan. This may take several seconds or minutes depending of the size of your site. Using P3-Profiler you’ll identify the plugins that consume most of the time of your WordPress Site. Start with the one that consumes most of the time: Ask yourself the following question:
- Do you really need this particular plugin?
- What value does the plugin provide for you and your visitors
- What would happen if you simply delete it – yes delete it!
- If you can’t delete it: Can you replace the plugin with a different one providing the same functionality with smaller amount of processing time needed?
Repeat this step for every plugin you’re using. If you have identified one or more plugins you can live without make sure you de-activate and delete it completely from your WordPress installation.
Why you need a caching plugin to make WordPress faster
As soon as you are done with the plugins let’s go over to leverage the real performance boost: Caching! Let me explain a few words first how WordPress works. Don’t worry – you do not have to become a programmer 😉
What WordPress does while you wait for a page to load
WordPress like any other Web application consists of php-files, css-styling files and a mysql- database. The php-files usually contain the “logic” of the theme or plugins you are using. CSS (cascading style sheets) hold the code for the design of your site. And finally the mysql (or mariadb) database contain the content of your pages and posts along with many settings your WordPress installation needs to store – like the domain name or the paths of your URLs.
- Themes on Themeforest – best new Themes June 2017 - 7. July 2017
- Remove line breaks & paragraphs from Contact Form 7 - 26. April 2017
- New Themes & Plugins for WordPress - 25. April 2017
- Envato: Latest Themes for WordPress (Week 15 / 2017) - 18. April 2017
- Speed Up WordPress - 17. April 2017