WordPress is one of the most widespread and easily customizable CMSs. However, it’s pretty slow in the default configuration, especially, if the site has a lot of visitors and heavy content, or uses a complex theme.
You can check your website using online tools such as the ones below to track the website speed results after each step:
All these tools will provide insight on how your website loads and which parts of the website take more time to load than others (i.e. which need to be optimized).
There are some tips to optimize and improve performance of your wordpress website:
The main and the most important rule about choosing a theme for the WordPress website is that WordPress theme should correspond to the content of your website. You should define the topic of your website and the content first, and only then choose a theme which will suit your needs. Many WordPress themes are customizable and allow WordPress users to tweak multiple theme options to create the desired look for their websites. However, these options, if they are coded improperly, can create issues with changing the theme to another one.
Some WordPress themes which are quite attractive at first glance can actually make your website load more slowly than it should. Below are several useful tips to help you select the best theme for your WordPress website:
1. The simpler, the better.
2. Choose a theme with a responsive design.
3. Try to choose only highly-rated plugins compatible with your version of WordPress
4. Pay attention to the presence of page builders which come with the theme.
5. Consider SEO friendliness of the theme.
Deactivate and delete any unnecessary plugins. Try selectively disabling plugins to measure server performance. Then you can look at optimizing plugins. You can use Caching Plugins to start optimization process.
Caching plugins can be easily installed and will cache your WordPress posts and pages as static files. These static files are then served to users, reducing the processing load on the server. This can improve performance several hundred times over for fairly static pages. When combined with a system level page cache such as Varnish, this can be quite powerful. If your posts/pages have a lot of dynamic content configuring caching can be more complex.
A number of WP caching plugins are in use, and the vast majority of them drastically improve the page load time.
W3 Total Cache and WP Super Cache are the most popular ones. The main difference between them is that W3 Total Cache is more customizable. W3TC utilizes multiple techniques to improve performance, including:
- page caching
- gzip compression
- CDN (Content Distribution Network) support
- browser caching via ETags
Below are the guidelines for its initial setup and tweaking.
To configure the plugin, go to Plugins >> Installed Plugins >> find W3 Total Cache >> Settings:
On Plugin page, scroll down the page and check Enable next to the following options:
1. Page Cache
3. Browser Cache (more details on browser cache setup in W3 Total Cache can be found in the next paragraph)
Then click on the Save All Settings button.
Optimizing the database
Optimizing the database may also be useful for a WordPress blog. Currently, WordPress has 11 core tables. Most WordPress websites have even more tables because plugins and some themes save additional settings and other data in the WordPress database.
You can use specialized WordPress plugins such as:
WP-Sweep uses proper WordPress delete functions as much as possible instead of running direct delete MySQL queries, whereas the WP-Optimize plugin uses direct delete SQL queries which can leave orphaned data left behind.
Note: Back up the database and/or the whole website before making any major adjustments, especially to third-party plugins.
Clean Up Your Media Library and Post Revisions
As your site grows, your media library will fill up with images, documents, and other files. Even if you use image optimization, this many files can start to strain your server resources. A fair amount of these files might not even be used anymore. Identifying and deleting unused media files can be an incredible pain if done manually, however. Fortunately, there are plugins that can help you out.
In this case, we recommend that you use the Media Cleaner plugin.
This plugin will automatically find and delete any unused media files in your library. It will search for files that don’t appear on any pages or posts and place them in a trash bin. This enables you to sort through them and save files you want to keep even if they’re not used on the site.
Another potential resource-waster is post revisions. These enable you to see earlier versions of posts, which can be helpful while you’re creating content. However, since these are essentially copies of your existing posts, they can also take up a considerable amount of unnecessary space
You should, therefore, make sure to regularly clean up your revision archive. One plugin that enables you to do this is WP-Optimize, which also cleans up your comments table in the process.
Smush Image Compression And Optimization
One of the biggest drains on your site’s resources is its images. They’re great for making your site look amazing and for supplementing your text content, but they also require both server space and bandwidth. This is especially true if your site contains high-quality images, such as in a portfolio or online store.
Large file sizes have a negative effect on loading times and bandwidth usage, which harms the overall user experience.
Using a plugin like Smush Image Compression and Optimization can make a huge impact on page load times. Image optimization is a process that compresses the size of an image file without noticeably affecting its quality.
The plugin works to resize, optimize and compress all of your images for the web so they load faster than before. If your site is photo-rich, then this plugin is a must-have.
Optimizing your website is no longer an option. A slow site can lead to a significant drop in the number of visitors who stick around, which will negatively affect your bottom line.