Tips on How to Speed Up Your WordPress Site

Everyone needs their sites to load and work as quickly as possible. But this will not happen by itself, especially if the site is filled with quite heavy content and it is visited by a huge number of people. CMS WordPress is not a sample of an ideal fast platform, but there are ways to help speed up the site load. Remember that this affects not only the loyalty of visitors but also the place of your site in the search results since Google uses the page load time as one of the ranking factors.

You can check the download speed of the site using the Google Page Speed tool to track the impact of each step that we’ll take further.

Optimizing WordPress – Tips

Choosing a theme for WordPress

The theme that you use for the site, plays a key role in the speed of its download. If you are planning to create a large site designed for a large number of visitors, we recommend choosing a topic based on its “ease”. It is best to search the WordPress forums and read the testimonials of experienced users, and also try a few different topics on the test version of your site. If you are already using a topic, but you see that it does not satisfy your desire for speed, then it makes sense to change it. This will be your first step in working on how to speed up the site on WordPress.

Optimizing WordPress images

Without images, your site is unlikely to work, so it’s important that they are optimized.

Use images of the appropriate size. Do not load large images, so you can scale them in HTML. Make sure that you upload photos and other images no larger than the one that should be displayed.

Remove all unnecessary information from the photos (creation date, camera, GPS coordinates, etc., which can be found in the file properties). With this, you can use the plugin to optimize images of WordPress WP Smush.it.

To speed up WordPress will help CSS-sprites – the technique of CSS, which allows you to combine all the elements of design on the page into one image. As a result, rather than downloading multiple individual images, each time an HTTP request is made, the site will open one image. You can use CSS sprites in case the current theme of your site supports them.

There are many plug-ins that will help you reduce the size of images. For example, EWWW Image Optimizer or the already mentioned WP Smush.it. You can also use third-party services to reduce the size of images. For example, the service Tinyjpg perfectly reduces the size of images without loss of quality.

Let’s show how to process all your images With EWWW Image Optimizer in just a few clicks:

After you installed and activated the plug-in, go to the WordPress admin panel and go to the Media menu >> Bulk Optimization:

You will see an option for optimizing all images in the library. Click the “Start optimization” button.

If you need to optimize the image outside the media library (for example, graphic elements of the active theme), use the “Scan and optimize” button.

Important: the plug-in allows you to determine the degree of compression of images. For example, if you have a photoblog, very optimized images will lose quality.

File Compression

Optimizing the site WordPress is possible and through the compression of files. If you use the cPanel hosting panel, you can use the “Optimize your website” menu.

It’s very easy to use: just select the “Compress all content” option and click “Update settings”. This way all the files on your website will be compressed. If you want to compress only a certain type of files, then use the “Compress the specified MIME types” option.

Browser Caching

Using the .htaccess file of your site, you can configure the retention period for static content (CSS, Javascript, image, etc.) in browsers. This will significantly reduce the time of loading your site for regular visitors.

Open the .htaccess file located in the root directory of the site, and add the following code:

The shelf life can be changed depending on your requirements.

Important: before making any changes to .htaccess, make a backup of this file. If something goes wrong with the .htaccess file, the site will not work.

WordPress Caching

Such plugins will significantly improve the speed of loading pages. The most popular are W3 Total Cache and WP Super Cache. The main difference between them is that the W3 Total Cache is more flexible.

Consider the example of setting W3 Total Cache:

After you installed the plugin, in the WordPress control panel go to the Plugins >> Installed >> W3 Total Cache >> Settings menu.

Important: if you are a user of a virtual hosting, remember that all possible caching options should not be enabled at the same time (avoid using the Toggle all caching types on or off (at once) option). If Object caching and Database caching are enabled, they can cause problems using the resources of your hosting account without improving the page load speed. But if your site is on a VPS or a dedicated server, then you will not be affected.

In the Settings menu, enable the following options:

  • Page Cache
  • Minify
  • Browser Cache

And then click on “Save All Settings”.

Using the caching plugin for WordPress, the site will load faster.

Using CDN

CDN is a content delivery network that consists of servers that copy your site across all of their locations. When your visitors make a request to the site, the server closest to them gives away the content, which significantly reduces the speed of response in comparison with the reference to the main data center of the hosting provider.

One of the most popular CDN services is Cloudflare. This is what we recommend to use our client and offer together with all the packages of virtual hosting.

All other items below affect not so much the speed of page loading, both on optimizing the use of resources and the overall user experience, so they are no less important.

Optimizing your home page

The first thing people see on your site is the home page. And if the user came directly to some other page, then still many people go after that to the main page. Some tips for optimizing your home page:

  1. Do not add too many widgets. Use only those that you really need. Also, they should not be too heavy.
  2. If you have a blog, do not display the full content of new posts on the main page. Do a preview of the post with the link “Read more.”
  3. Do not display more than ten posts on the main page.

Configuring LazyLoad – pending image uploading

LazyLoad – plug-ins that help you to postpone loading images. This is relevant for sites where there are a lot of images. Uploading an image begins only when the user reaches a certain position on the page. Therefore, if there is an image on the page at the very end, and the user simply does not loot to that point, then the image will not be downloaded. An example of such a plugin is jQuery Image Lazy Load.

Of course, you will not see the visual effect of this plug-in, but it can reduce the consumption of server resources by your site, downloading less information for users who flip through the pages incompletely.

Enabling protection against hotlinking

If a direct link to an image that is on your server/site is placed on some other site, every time someone opens this image, the request will go to your server and consume the resources of your account. The solution to this problem will be a complete blocking of such requests.

If you are a cPanel user, you can use the built-in “Hotlink Protection” option.

Also, you can enable protection from hotlinking using .htaccess code:

Using this code, your server checks where the request came from: if from the pages of your site, then it will return the image to the user without problems; if from someone else’s site – the server displays an image with an error (nohotlink.jpg – any image you want to use for this purpose).

That’s all! These are the basic options for optimizing the site on WordPress, which will not require you much time but can improve the performance of your site.

Authored By Imran Yousaf

I am Imran Yousaf, a computer geek, founder of the site Smashinglab.com. I am a die hard fond of open-source software and Linux operating system. In addition to Linux, I am interested in everything related to information technology and modern science.

Leave a Reply

Your email address will not be published. Required fields are marked *