Home
/
WordPress Tutorials
/
How to Optimize WordPress for Better Speed

How to Optimize WordPress for Better Speed

This tutorial will give you some tips on how to improve the speed of your WordPress website. Having a fast site is essential if you want to provide your visitors with a great user experience and rank well in search engines like Google and Bing which consider the loading speed of your pages.

Important! Only now our WP speed experts share their best WordPress Speed Optimization tips with you in brand new eBooks for FREE!

Use Dynamic Caching

Using Dynamic caching for your WordPress site will have a great effect on its speed. Аt SiteGround we have created a tool called the SuperCacher which is enabled by default for all websites. With it, you can install a small plugin and manage the Dynamic caching with a single click. For more information on how to use it, check out our SuperCacher Tutorial.

Enable Memcached

The Memcached service, which is part of SuperCacher, uses our own implementation of the popular Memcached system. It speeds up database calls, API calls, and page rendering by storing data and objects in the server’s RAM to reduce the number of times a database is queried.

You can use the Speed Optimizer plugin to enable Memcached for your WordPress website.

Important! Always test your website after enabling Memcached. Websites with larger databases may notice a degradation in performance and responsiveness when using this functionality.

Use CDN

Our own Content Delivery Network – SiteGround CDN – is developed specifically for our clients and makes it possible for their content to be cached and replicated across multiple locations. This in turn improves the loading speed of your visitors no matter their location.

You can activate the service from your Site Tools.

Configure your website to work via HTTPS

Configuring your website to open via HTTPS not only makes it more secure, but it makes it benefit from the innovative and faster HTTP2 protocol that’s available on all our servers.

First issue an SSL certificate for your website. Once the SSL is issued and installed you can enable HTTPS for your website with a single click in the Speed Optimizer plugin.

Use the latest available PHP version

Newer PHP versions usually provide many performance improvements so it is recommended to always use the most recent PHP version for your website. You can change your PHP setup through Site Tools > Devs > PHP Manager.

Use Brotli/gZIP compression

Brotli and gZIP decrease the size of the data that is being transferred between your server and your visitors by compressing images, CSS and JavaScript files. When your visitors’ browser receives the compressed elements it decompresses them before rendering. This significantly lowers the size of information that is being transferred lowering the loading times of your website’s pages.

Both Brotli and gZIP are enabled by default for all websites on our servers.

Leverage browser caching

Leveraging browser caching means that you can specify for how long your visitors’ browsers should cache your images, CSS, JS, and flash files. However, if any of those resources are changed, your server will notify the visitor’s browser and the cached content will be replaced with the new one.

This functionality is enabled by default for all websites on our servers.

Minify HTML, JS, CSS

Minifying your CSS and JavaScript files means that all the unnecessary data from them like double spaces, empty new lines, comments, etc. will be removed from the files lowering their size. This makes the amount of data that needs to be transferred to the visitors’ browsers less and thus making the website load faster.

You can use our Speed Optimizer plugin to achieve this. The plugin will also combine all Google Fonts requests used on your website into one.

Combine CSS and JS files

Combining CSS and JS files will reduce the requests made to your website and thus improve its loading speed. You can use the Speed Optimizer to combine these assets. The plugin will keep the scripts and styles in their original location after the combination for the best compatibility with other plugins.

Optimize your Images

Images are an essential part of every website. It is important to have them optimized. There are a few things regarding the images that you should have in mind when developing your WordPress site:

  • Use images with the proper size. Do not upload big images and then scale them with HTML. Make sure that your photos and other images are not bigger than the size you’re displaying them in.
  • Use the Speed Optimizer image optimization functionality. We have selected optimization techniques that provide optimal results without diminishing the quality of the images.
  • Enable Lazy Load. This makes your images load only when they are about to become visible to your visitors and not in the initial loading process for your page.

Delete unused plugins

Deleting unused WordPress plugins can improve the speed of your website.

Each plugin (active or inactive) can add extra load to your server. If a plugin isn’t actively being used on your site, it might still be running some code in the background, consuming server resources. For example, some plugins often add additional Javascript and CSS files to your page.

By removing unused plugins, you will reduce the server’s workload, allowing it to respond faster to requests.

Keep WordPress, plugins and themes updated

Each new update features not only new functionalities but also improvements that make your website compatible with the latest PHP versions and have the latest optimizations. Updates also regularly include fixes for security issues and bugs.

Having your WordPress website, theme, and plugins updated to the latest available versions ensures that your website is not only more secure but more optimized as well.

You can use our WordPress Autoupdate Tool to always keep your website safe and up-to-date.

Disable or Limit Post Revisions

Each time that you save a draft or update a post, WordPress creates a revision and stores it in the database. Over time, these revisions can accumulate, significantly increasing the size of your database. A larger database can slow down your website, as it takes longer for WordPress to retrieve and display data. By limiting or disabling revisions, you keep your database more streamlined and efficient.

Therefore, with fewer revisions, database queries executed by WordPress (for fetching posts, pages, or other content) become more efficient.

To set a specific limit on post revisions, access the wp-config.php file of your site (found in the root directory) and insert the following line of code at the end of the file:

define('WP_POST_REVISIONS', 5);

By setting WP_POST_REVISIONS to 5, you limit the number of revisions stored in the database to 5 per post or page. Older revisions beyond this limit are automatically deleted. You can change the number to whatever you prefer, or set it to 0 to turn off the revisions, but this is not recommended.

WordPress Speed Optimization 101 Tips – Video Tutorial

Tutorial Menu

Share This Article