Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

18 Useful Tricks To Speed Up WordPress & Boost Performance

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
18 Useful Tricks To Speed Up WordPress & Boost Performance

Do you want to speed up your WordPress site? Fast loading pages enhance user experience, increase your pageviews, and help your SEO as well. In this article, we will show you some of the most useful tricks to speed up WordPress and boost performance.

Speeding up WordPress to boost performance

1. Choose a Good Web Host

Choosing a web host will be the most important decision for the success of your site. If you are not on a good web hosting service, then everything else you do to speed up your site will simply fail.

If you are just starting out, then we recommend Siteground. They are an official WordPress recommended hosting provider, and are known to provide top-notch service.

If you can afford to spend a little more, then go with WPEngine. They are a managed WordPress hosting provider which means they will take care of all things WordPress for you.

For more recommendations, check out our guide on how to choose the best WordPress hosting.

2. Use a Caching Plugin

WordPress is written in PHP, which is a server side programming language. This means every time someone visits your website, WordPress runs a process to fetch the information and then display it on the fly to your user.

WordPress page cache explained

This process can slow down your site when you have multiple people visiting your site.

The solution is to use a caching plugin.

Instead of generating every page on the fly, your caching plugin will serve a cached version of the page to user’s browser.

We use W3 Total Cache on WPBeginner, but this plugin hasn’t been updated in a long time, and we will be switching soon.

We recommend that you use the WP Super Cache plugin. See our guide on how to install and setup WP Super Cache on your WordPress site.

3. Use CDN

Many files on your website are static such as images, CSS, and JavaScript. These files normally don’t change. However when a web browser is downloading your page, these files can stop it from displaying the page to your users.

CDN or content delivery networks solve this problem by serving your static files from their servers across the world. This frees up resources on your server, makes your website fast, and improves user experience.

What is a CDN

We use MaxCDN on all our projects. It works well with WordPress websites and integrates into your existing WordPress caching plugins. See our guide on how to install and setup WordPress CDN solution MaxCDN.

4. Optimize Images for Speed

Optimize images in WordPress

Images are one of the most engaging content on the web. Usually, most websites have dozens of images on each page. They also take the longest to load.

You need to make sure that the images you use in WordPress are properly optimized for the web. Most image editing software allow you to save optimized versions without any noticeable quality loss.

For more information and detailed instructions see our guide on how to save images optimized for web.

5. Use a Theme Optimized For Speed

Selecting a WordPress theme

When selecting a WordPress theme for your website, pay special attention to speed optimization. Premium WordPress theme shops like StudioPress, Themify, and ArrayThemes offer themes that are well coded and optimized for speed.

After installing a theme, there are several things you can do to optimize speed. But if your WordPress theme is poorly coded, then you may end up wasting time and valuable resources.

See our guide on how to properly switch your WordPress theme for a smooth transition to a well coded theme.

6. Use a Faster Slider Plugin

Soliloquy the fastest WordPress slider plugin

Sliders are another common web design element that can make your website slow. You need to make sure that you are using a WordPress slider that does not slow down your site.

We compared the best WordPress slider plugins for performance and features. Soliloquy tops our list of fastest and most feature rich WordPress slider plugin in the market.

7. Use Excerpts on Homepage and Archives

Using excerpts on WordPress homepage and archives

By default, WordPress displays your full article with all the images on the homepage and archives. This means your homepage, categories, tag, and other archive pages will all load slower.

Another disadvantage of showing full articles on these pages is that users don’t feel the need to visit the actual article. This reduces your pageviews.

See our article on full post vs summary (excerpt) in your WordPress archive pages.

8. Split Long Posts into Pages

Split long posts into pages

If you publish long form articles with lots of images, then consider splitting them into multiple pages. WordPress comes with built-in functionality to do that.

Simply add <!––nextpage––> tag in your article where you want to split it into next page. Do that again if you want to split the article on to the next page as well.

For detailed instructions, see our tutorial on post pagination – how to split WordPress posts into multiple pages.

9. Split Comments into Pages

Paginate comments

Some of your articles will get more comments than others. If you are displaying all the comments on the same page, then it will increase your page load time.

WordPress comes with a built-in solution for that. Simply go to Settings » Discussion and check the box next to ‘Break comments into pages…’ option.

Paginate comments in WordPress

For detailed instructions, see our guide on how to paginate comments in WordPress.

10. Remove Inactive Plugins

Many beginners often install too many plugins and then forget to uninstall a plugin that they are not even using.

This is problematic because not only these plugins increase your WordPress backup size, they can also slow down your website.

Review installed plugins on your WordPress site and remove the plugins that you are not using.

11. Keep Your Site Updated

WordPress updates

WordPress is a well maintained open source project, which means it is updated frequently. Updates fix security issues, bugs, and offer new features.

All WordPress plugins and themes are also regularly maintained and updated.

As a site owner, it is your responsibility to keep your WordPress site up dated. Not doing so will make your site slow and unreliable. It can also make your site vulnerable to security threats and hacking.

For more on this topic, see our guide on why you should always use the latest WordPress version.

12. Don’t Upload Videos to WordPress

Use YouTube to embed videos in WordPress

You can directly upload videos to your WordPress site, and it will automatically display them in an HTML5 player.

But you should NEVER do that!

Hosting videos will cost you bandwidth. High quality videos consume more bandwidth. WordPress cannot optimize quality of your videos or serve them properly to users with slow internet.

Hosting videos also increases your backup sizes tremendously, and makes it difficult for you to restore WordPress from backup.

You can easily embed videos in WordPress from video hosting sites like YouTube, Vimeo, DailyMotion, etc. This not only saves you from trouble, it also improves user experience and page load speed of your website.

For more on this topic, see our article on why you should never upload a video to WordPress.

13. Reduce External HTTP Requests

Cross domain requests

Many WordPress plugins and themes load scripts, stylesheets, and images from external resources like Google libraries, Facebook SDK, analytics services, and so on.

Many of these servers are optimized to serve data quickly. It is OK to use them, as they act like a content distribution network and will serve the relevant file more quickly than your web server.

However, If your site is making a lot of these requests, then this could slow down your website significantly. Try to reduce external HTTP requests by looking at the plugins and themes carefully.

14. Reduce Database Calls

Many WordPress themes are not properly optimized to utilize WordPress standard practices. Such themes end up making direct database calls, or too many unnecessary requests to the database.

Even well coded themes have code that makes database calls just to get your blog’s locale. Like this:

<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="
<?php bloginfo('html_type'); ?>;
charset=<?php bloginfo('charset'); ?>" />

You can’t blame theme developers for that. They simply have no other way to find out what language your site is in.

But if you are customizing your site using a child theme, then can replace these database calls with correct information.

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Review your parent theme for instances like this that can be easily replaced with static information.

15. Optimize WordPress Database

Optimize WordPress Database

After using WordPress for a while, your database will have lots of data that you probably don’t need any more. Your database also needs to optimize tables for improved performance.

This can be easily managed with WP-Sweep plugin. It allows you to clean your WordPress database by deleting things like trash, revisions, orphaned meta, etc. It also optimizes database table structure with just a click.

See our guide on how to optimize and clean up your WordPress database for improved performance.

16. Limit Post Revisions

Post revisions take space in your WordPress database. Some users believe that they also affect database queries run by plugins which may not exclude revisions.

You can limit the number of revisions WordPress should keep for each article. Simply add this line of code to your wp-config.php file.

define( 'WP_POST_REVISIONS', 4 );

This code will limit WordPress to only save last 4 revisions and discard older revisions automatically.

17. Disable Hotlinking and Leeching of Your Content

Prevent image theft in WordPress

Some content scraping websites automatically create posts from RSS feeds of other WordPress sites. That’s why we recommend showing only excerpts in RSS feeds.

See our guide on preventing blog content scraping in WordPress for more ways to deal with content scraping.

However, some content scrapers manually copy and steal your content. Instead of uploading images to their own servers, they serve them directly from your website. This way they steal your bandwidth, and you don’t get any visits at all.

Simply add this code to your .htaccess file to block hotlinking of images from your WordPress site.

#disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wpbeginner.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L] 

You may also want to check our article showing 4 ways to prevent image theft in WordPress.

18. Use a Faster Gallery Plugin

Faster image gallery plugin

If you have a photography website or a portfolio, then you will need to use a gallery plugin to display your images beautifully. It is really important that you use a WordPress gallery plugin that is optimized for speed.

We recommend using Envira Gallery, which is the best WordPress gallery plugin in the market. It allows you to create beautiful image galleries that are lightning fast to load.

We hope this article helped you learn some useful tricks to speed up WordPress and boost performance. You may also want to see our list of 40 useful tools to manage and grow your WordPress blog.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. Patxi says:

    Hi there :)

    Great article clarifying many doubts!

    One question, I usually use in my posts images stored on flickr, drive, etc. Some good practice for this?

    Thanks a lot!

  2. Ahmad says:

    Hi, thanks for the list of tricks,
    I saw WP super cache is about the same like W3 Total Cache which has not being updated for a long time (4 months and 6 months). What is happened to them? Do you still recommend WP Super Cache according to the fact?

  3. Gaurav says:

    i have my website hosted on godaddy and it does not allow caching plugins such as total cache.. w3 total cache or eveb super cache.. i have tried someother plugins for caching but no effect can you suggest me some very good caching plugin apart from the ones mentioned above? ..

  4. Carmelo says:

    With proper caching step 14 isn’t necessary. Your cache plugin will be serving static HTML, no additional DB calls will be made. If your running object cache, those values should already be stored in memory.

  5. Justine Pretorious says:

    Excellent advice! Looking forward to trying some of the suggestions!

  6. Mark Klinefelter says:

    Excellent article! I have most if not all of these incorporated on my live site. The theme Jupiter is built for speed. WP-Rocket cleans up the database also automatically. The html command of “next page” does not work with Visual Composer. I use the latter to compose pages and posts. I wrote to them in the UK a while back but nothing changed. Also on top of slow sliders and galleries many grid plugins are slower than a tortoise.

  7. Luke Cavanagh says:

    Some decent speed seep up tips.

  8. samia says:

    Hi,

    I would like to have further information about point 14.

    How to know that the theme is sending too much calls to the database ?
    How to reduce that ?

  9. Christopher says:

    Is the tag bad for my site´s SEO?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.