You can’t afford to waste a second on the internet. Speed matters, particularly when it comes to loading time. In fact, if your WordPress site is sluggish and forces users to wait for even a few seconds, you’re likely to feel the negative effects right away. You can see rising bounce rates, decreased conversions, and poor search rankings.

Below, we’ll present several methods you can use to make sure your site loads faster and performs smoothly. The more of these techniques you employ, the better your results are likely to be.

WordPress Hosting

Starting from a solid foundation is key. Regardless of any optimization performed, performance will always be first determined by the environment in which your WordPress website is hosted. Choosing the right WordPress hosting company is key! You will want to make sure the host provides support for the latest minimum requirement defined by WordPress.

To run WordPress we recommend your host supports:

  • PHP version 7.3 or greater.
  • MySQL version 5.6 or greater OR MariaDB version 10.0 or greater.
  • HTTPS support

That’s really it. We recommend Apache or Nginx as the most robust and featureful server for running WordPress, but any server that supports PHP and MySQL will do. That said, we can’t test every possible environment and strongly recommend hosting with our hosting provider, Joker Web Hosting.

Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 5.2.4+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.

Minify CSS / JavaScript Files in WordPress

Creating the smallest footprint possible will decrease your WordPress load time and increase overall performance. In a nutshell minification of CSS and/or JavaScript files reduces the size of each file making the overall website size smaller. With identical settings a website that is half the size of another will historically load faster. While manual minification can be done it is far easier to install a plugin that will do it for you. A few that we have used and had success with are:

WP Super Cache

This is one of the most widely used caching plugins available for WordPress. At the time of writing this post it has had over 2 million active installations. It’s straight forward to setup but has some settings for advanced users which can be used to get more out of the plugin.

W3 Total Cache

This is another popular speed enhancing plugin. It goes beyond just being a simple caching plugin. It’s a complete framework. We have implemented this plugin within many optimization strategies over the years.

There’s a huge array of options and various caching methods that are supported.

There’s advanced support for CloudFlare and various CDN services.

But, the reality is that because there are so many options, it’s not the easiest to setup. And if you don’t know what you’re doing, you could break something. That’s why only advanced users should use this plugin.

It’s also worth noting that uninstalling this plugin can be tricky – it takes more than the typical deactivating and deleting to get rid of it.

Image Compression

To improve your WordPress website speed, you need to optimize your images for the web. The best way to do this is by using Photoshop or another image editing software before you upload the image to WordPress. This gives you a lot more control on the quality of images on your website.

However, not all users are comfortable working with image editing program. For some optimizing every single image they upload sounds like a lot of work.

Luckily, there are several WordPress image compression plugins that can help you with that. These plugins optimize your images by automatically compressing them and using the smaller sized version on your website.

EWWW Image Optimizer

EWWW Image Optimizer is a great option for WordPress image compression plugin. It is easy to use and can automatically optimize images you upload on the fly. It can also compress and optimize your previously uploaded images in bulk.

WP Smush

WP Smush is another popular WordPress image compression plugin. It automatically compresses images on upload and can also be used to compress and optimize your older image files. You can also set maximum image resolution, and your images will scale down to more reasonable sizes while being compressed.

The free version of plugin doesn’t require you to create an account to use their API key. The bulk optimization feature allows you to optimize up to 50 images at a time, and you can rerun the bulk optimizer to compress more images.

Enable GZIP Compression in WordPress

WordPress GZIP compression is the process of reducing the size of your website files, including HTML, JavaScript, and CSS. GZIP compression must be enabled on your web server in order for it to work. If you are hosting with our provider, Joker Web Hosting, you are in good hands and GZIP compression is enabled for you.

The first and one of the easiest is by using a caching plugin that supports enabling GZIP. WP Rocket for example adds GZIP compression rules in your .htaccess file automatically using the mod_deflate module. W3 Total Cache, mentioned above, also has a way to enable this for you under it’s performance section. Even though these are plugins, this still relies on permissions to modify files on your webserver. If your caching plugin doesn’t have permission, you will need to ask your host or use a snippet of code below.

The second way to enable Gzip compression is by editing your .htaccess file. Most shared hosts use Apache, in which you can simply add the code below to your .htaccess file. You can find your .htaccess file at the root of your WordPress site via FTP.

<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent
</IfModule>

Ensure that you add it below the current contents of your .htaccess file. Example below:

Minimize Plugins

An easy way to improve WordPress performance is to only use plugins that you absolutely need. Even if you find a plugin that you can’t do without because of the functionality it provides, you may be able to find a replacement that is optimized better. For example, many people want to pull in a Facebook feed into their WordPress website using a plugin. While this is a request we hear all the time we always use caution when doing so. There are a multitude of plugins that will accomplish this task but only a few that are lightweight in nature. It’s always a good idea to not put something like this on the main landing page if you are specifically looking to optimize that page.

Wrapping It Up

There isn’t always a one size fits all approach as each WordPress installation is different. The content varies, the themes vary, the plugins vary, etc. Even when adding speed boosting plugins you may find that your website loads even slower. This could be caused by plugin conflicts or other advanced plugin settings you aren’t aware of. We always recommend consulting with a professional and would gladly discuss your WordPress speed optimization project. Contact us today for a free evaluation.