Improving WordPress site speed is a topic that often gets overlooked by webmasters. We are so focused on adding new features, redesigning our website, or just making sure it’s running smoothly for our customers that we forget about one of the most important aspects of any website loading speed. In this blog post, I will cover some tactics and strategies you can use to improve your WordPress site speed.
Tactics and Strategies
Optimizing and Cleaning the Database
Your website database is the library that stores all of your data and plugins. Unfortunately, sometimes that data becomes outdated and unnecessary. One way to improve your WordPress’s speed is by optimizing and cleaning your database. There are several ways you can do this, depending on which tools you want to use.
WP-Optimize is a free tool that you can use to optimize and clean your database. The free version is very powerful. You can use it to optimize your database, remove orphaned data and unused tables.
If you want a more in-depth look at how the database is performing and what’s taking up space within the WordPress environment, you can look to a tool like Query Monitor.
One of the easiest ways to clean the database is to go through the wp-admin area and delete any old content that you no longer need.
You can do this by going into posts, pages, or custom post types, then selecting all items from a specific date period marked as trash. Next, you will see an option on the top left side of your screen called ‘Delete.’
The downside to this is that you are deleting content from your website. If there’s something inappropriate or needs to be kept for some reason, then don’t delete it! You can always back up the database before you start anything, so you have a copy if anything goes wrong.
Uncompressed images take up more space on your site and delay load time. This is especially important for those on shared hosting, which can slow down the loading times even further by serving multiple requests at once because of higher demand.
This doesn’t always have to be done, but this is another thing you could automate with a plugin like ShortPixel. ShortPixel gives you the ability to set a few settings for when it automatically optimizes your images.
We recommend using the Lossy setting as most web visitors will not be able to visually see a difference in quality, but it will provide you the best savings.
You can also select a setting that will optimize your images for retina screens.
Using Nextgen Image Formats
It’s important to keep up with the latest and greatest web technologies to take advantage of new opportunities. One of those technologies is nextgen image formats like WebP or AVIF, which provide better quality than JPEGs while also taking up less space on your site. Make sure you convert your images using a service like ShortPixel so that your website will serve WebP images on supported browsers and non-WebP on other browsers.
Minifying CSS and JS
Minifying CSS and JS is another way you can improve WordPress site speed by removing extra spaces in files, adding one space instead of two between properties/declarations, writing properties in a single line, and removing any comments or unnecessary whitespace. You can use many tools to minify your CSS and JS, including the WP Rocket plugin.
Eliminating Unused CSS or JS
One of the most effective ways to improve your WordPress site speed is eliminating any unused CSS or JS. Bauertech does this by leveraging a powerful plugin called Perfmatters.
Perfmatters will allow you to disable any CSS stylesheet or JS file, which will limit the number of requests on your site and improve load time. I recommend having a professional perform this work for you.
WP Rocket has a beta feature for removing Unused CSS that will automatically scan your web pages for changes and remove any unused CSS. This feature still needs some work, but it’s worth testing out for your website!
You can also delete unused CSS or JS by using websites like PurifyCSS or UnusedCSS.
The downside to this is that your site will break if you delete content in your theme or plugin file, and then it becomes necessary due to a design change.
Preload is something I’m really excited about because of all the potential it has for improving site speed. Preloading is a feature where you anticipate the user might need an asset. Then, you do the work of loading that asset in advance before they get to it so that when they request it, it’s already ready for them. There are some plugins available, like the WP Rocket plugin, which will pre-fetch any content of your website.
Caching is a process of storing files’ content in the browser’s memory so that they can be served up more quickly to each visitor. This is really good for those who have slower servers or are running WordPress on shared hosting. It doesn’t require any additional resources from our visitors, just the time elapsed between when you updated the cached files in WP Rocket and their visit.
Many plugins will cache for you, but I prefer WP Rocket because it caches your entire site instead of just the front end. It also does an awesome job of finding out which parts need to be cached based on your traffic. Whenever you make any changes to your site (or someone else makes them for you), WP Rocket will automatically update the cache.
WP Rocket will generate static HTML files of your website stored in a directory (usually wp-content) and served up when a user navigates to your site. Because it does not require any additional resources from your visitors, using WP Rocket can be helpful even for people who have slower servers or use shared hosting.
In conclusion, WordPress site speed is something that you should be thinking about on an ongoing basis because of its potential benefits. You can do this by optimizing and cleaning the database, compressing images, using nextgen image formats, preloading content, caching pages for visitors who come back again and again or those with slower connections to your site (like shared hosting), minifying CSS and JS files which will reduce file size without changing any of the functionality on your site, and removing unused CSS or JS files. Even though optimizing a WordPress website can be a daunting task, Bauertech has the knowledge and experience to help you do everything you need.