1. Home
  2. /
  3. Web hosting blog
  4. /
  5. Improving WordPress website speed

Improving WordPress website speed

14/09/2022

It’s pretty obvious that everyone prefers fast websites over slow ones. And if your online business is built on WordPress,

If you haven’t figured it out yet, speeding up your WordPress site can help your site in many ways. Your users will be happier, your search engines will be happier, and more… But, unfortunately, WordPress doesn’t always make it easy to deliver fast pages to your visitors.

Here’s the good news: There are many ways to speed up your WordPress site, and you can implement some of them right away. It just requires a little patience on your part. In this post, we’ll discuss why it’s important to have a fast WordPress site. Then, we’ll share 25 ways you can optimize your loading times.

Why is it worth improving the speed of a WordPress website?

When testing new websites, nothing will make me hit the “back” button like a slow web page. And I’m pretty sure I’m not alone here – website performance has a huge impact on the user experience and greatly shapes how visitors judge the quality of an online business.

There’s not much room for error when it comes to page speed and patience. According to Google, your website should load in two seconds or less. Otherwise, visitors start to lose interest. Page performance is also a ranking parameter used by search engines, including Google. The faster your website is, the higher your chances of ranking in Google’s search engine results.

Now, WordPress doesn’t exactly specialize in speed. This is largely due in part to the way WordPress works: When someone visits a page on your site, WordPress dynamically builds the page by pulling data from various sources—like the WordPress database and theme files—and then combining them into an HTML file that’s sent to the visitor’s browser. Building pages “on the fly” like this isn’t always ideal for performance.

Additionally, WordPress themes and plugins all consume valuable server resources, even if you’re not actively using them on your site. Too many things running on your web server at once will exhaust its resources, slow down your pages, and result in low conversion rates.

As we’ll see shortly, many approaches to speeding up WordPress are fairly non-technical, while others involve installing a plugin or even modifying some of the code yourself (as long as you know what you’re doing). You may even start to see improvements after following just one of these steps.

How to speed up your WordPress website?

  1. Run performance tests.

First, let’s understand where your site stands in terms of performance. There is no comprehensive metric that sums this up, as performance varies based on each surfer’s geographic location, internet connection strength, and whether your site is cached in their browser.

Page speed will also vary between pages on your site, depending on the amount and type of content on each. Website homepages are usually the starting point for assessing loading speed, although you should also check any other pages with particularly high traffic.

For the best tangible assessment, test your site with a free performance measurement tool like pagespeed . Simply paste in your homepage URL and see how your site is performing. This tool and many others even provide quick suggestions that you can implement, then try again.
Be sure to test performance regularly, especially after adding new functionality. This will confirm that your site continues to deliver pages at competitive speeds.

2. Choose a reliable web host.

Quality web hosting is the foundation of a fast WordPress website. It’s essential that you choose both a hosting provider and a plan that meets your bandwidth and performance requirements. Most WordPress hosts offer several types of hosting: shared hosting, dedicated server hosting, virtual private server (VPS) hosting, and managed hosting plans for WordPress websites.

When you choose a WordPress hosting plan, you generally get what you pay for. At one end of the spectrum, there’s shared hosting. These plans allow you to host your website on the same server as multiple other websites. You can’t beat the prices of shared hosting, so newer WordPress users may choose this option to get up to speed before upgrading. However, your performance will suffer if another website on your server gets a lot of hits, since you’re both running on the same resources.

Established websites with more content and higher levels of consistent traffic should instead find a dedicated, VPS, or managed hosting plan from a reputable provider. These plans will allocate enough server resources to handle increased traffic without impacting load times.

3. Make sure to update everything.

Updates are a part of life if you run WordPress. WordPress core, themes, and plugins all need to be updated to help your site run as efficiently as possible, among other things. Always run the latest versions to optimize performance, keep your site secure, fix bugs, and ensure every feature and tool works as it should.

4. Use the latest version of PHP.

PHP is the scripting language that powers all WordPress websites. It is a server-side language, meaning its files are stored and executed on the web server that hosts your website. Like themes and plugins, PHP also releases updates from time to time to run more efficiently, which in turn helps your pages load faster.

The latest stable version of PHP is PHP 7, which was released in 2015. PHP 7 is a significant performance improvement over PHP 6, and there’s really no reason why you shouldn’t run your website on it.

You can also check your hosting provider’s documentation or contact support to see what version of PHP you are using. If it is not PHP 7, ask your host to update your website’s PHP version.

5. Delete unused plugins.

Quality is better than quantity when it comes to WordPress plugins. Since each plugin is like a mini-piece of software on your website, running too many at once can negatively impact your site’s loading times. Even if you don’t use a particular plugin, there’s a chance it’s doing unnecessary work in the background and consuming resources. It might be time to cut back.

Start by disabling all plugins that you are sure you will never use again. Test your site after each deactivation, then delete these plugins after making sure everything is still working. Then, disable the plugins one by one to see which ones make a difference quickly. Consider finding lightweight alternatives to these plugins.

6. Install only high-quality plugins.

Now that you’ve taken care of the quantity part by cutting out your unnecessary plugins, make sure the plugins you keep around are high quality. The best WordPress plugins are coded in such a way that they only consume the server resources they need, when they need them. These plugins are also lightweight to code and won’t take up too much storage space on your server, and are updated regularly to keep up with WordPress core updates.

The best way to make sure your plugins are performance-friendly is by checking recommendation lists (we have plenty of them – start here if you’re interested), which typically take into account how well each plugin is built and maintained. Before installing a new plugin, check reviews and feedback for complaints about poor performance, and re-run performance tests after activation to make sure your speed hasn’t been significantly affected.

7. Use a lightweight theme.

Like plugins, your WordPress theme can put unnecessary strain on your web server. Themes loaded with high-quality images and effects may look cool, but they come at a price. Fancy effects can require a lot of code, and many themes are programmed inefficiently, both of which bloat file sizes and slow down your page performance.

Instead, choose a simple theme with just the features you need for your pages. You can always add more effects later using plugins or custom CSS if you want.

8. Optimize images.

Large images are another common cause of slow WordPress sites. Reduce the size of your image files as much as possible without sacrificing image quality. The goal is to save space but avoid making users squint to see your visual content.

You can compress image files with Photoshop or any other image editing software. You can also try a WordPress image optimization plugin like Smush or EWWW Image Optimizer.
For an article on image optimization

9. Try to “lazy” load your content.

If your WordPress site includes a lot of images, you can also implement lazy loading. Instead of rendering all the images on a page at once when the page first loads, lazy loading only loads the images that appear in the user’s browser window, deferring loading the rest until the user scrolls down to them.

Lazy loading gives the impression of faster page load time because your content loads gradually, rather than requiring your browser to do all the loading work at once. Besides images, lazy loading can be applied to other media such as embedded video, and also, other page content such as text and comments.

10. Do not store videos on your server.

This is because of all the types of files you can store on your website’s hosting server, videos are one of the most resource-intensive elements. They take up space and can significantly slow down your page when loading. Storing even one video on your website can hurt performance.

Still, videos are a great way to engage visitors, so you shouldn’t give them up completely. Instead of putting videos in your media library, use a third-party video hosting service like YouTube or Vimeo . These services handle the video hosting for you, so all you have to do is place the video on your page with an embed code. It won’t matter to visitors (they’ll still see the same video), but your user experience will be greatly improved.

11. Reduce CSS and JavaScript file sizes.

CSS and JavaScript are fundamental to your website—they elevate your pages beyond the walls of plain HTML. However, these files need to be sent from your web server to a web browser every time a visitor loads a page. So the smaller these files you can make without affecting the look and functionality of your site, the faster your pages will load.

To do this, use a free WordPress plugin like Autoptimize that scans your CSS and JavaScript files, removes unnecessary code (like spaces and comments), and minifies the files enough to load without lag.

12. Install a WordPress cache (cookies) plugin.

Often, WordPress performance issues can be related to the way WordPress assembles web pages on the server side.

Every time a visitor requests a web page from an unsaved website, the PHP on your WordPress server has to retrieve all the relevant content from your WordPress database, compile it into an HTML file, and send that file to the client. This method has its advantages, including saving server space and allowing for dynamic content on the site. However, it also takes more time and energy than sending a pre-written web page.

A caching plugin simplifies this entire process. It builds each HTML page on your site with PHP, then caches those full HTML pages to be sent to future visitors on request. By skipping the building process, your content reaches visitors faster.

When it comes to options, we recommend WP Rocket, W3 Total Cache, or WP Super Cache. All are popular and frequently updated.

13. Simplify your page designs and content.

Here’s a tip that works for any website – if you want to reduce load times, provide less content for browsers to load. In other words, simplify your designs.

Over the past 10 years or so, web design has seen a push towards more minimal designs. This makes sense for a number of reasons, including the fact that simpler pages simply consume fewer resources and load faster in browsers.

Minimal web pages are also better for UX, as they are less likely to overwhelm visitors compared to the cluttered designs that were once popular. Plus, it’s much easier to make simple pages responsive, meaning the page looks good across many different screen sizes, from desktops to smartphones.

Starting with your homepage, take some time to evaluate the content of each of your pages, and cut out anything that isn’t absolutely essential. This can be difficult, especially if you’ve invested so much in your current design, but it can make a noticeable difference in performance.

14. Organize your WordPress database.

If you’ve had a WordPress site for a while, chances are you’ve accumulated some old, unused files in your database. These files could be comment spam, data left over from unused themes and plugins, old users, unpublished content, and old media, all of which take up valuable storage space and put unnecessary strain on your server.

Plugins like WP Optimize and Advanced Database Cleaner will audit your files and delete anything that isn’t essential. This is a much faster and safer alternative to deleting files from your server yourself.
It is safer and even recommended to manually delete unused media files directly in your WordPress media library.

  1. Limit or disable advertising corrections.

Every time you save a post, WordPress automatically creates a copy of your version and stores it in your database, rather than deleting the previous version. This allows you to revert to any previous version of your post if you ever need to.

Although post revisions are a useful feature, they can build up in your database and slowly affect the overall performance of your site. By default, WordPress saves unlimited post revisions, but with a small tweak, you can limit the number of versions saved per post or disable post revisions entirely.

To limit post versions to a specified number, open your site’s wp-config.php file (located in your site’s root folder) and add the following code to the bottom of the file:
define( ‘WP_POST_REVISIONS’, 4 );
This code limits the number of saved revisions for each post to four. You can change the number to whatever you prefer, or set it to 0 to turn off revisions, although this is not recommended if you don’t track your changes elsewhere.

  1. Avoid redirects.

It’s understandable, things happen, posts get deleted and moved, or you need to rearrange your site structure. When this happens, the best way to avoid 404 errors is by implementing permanent redirects.

However, try to limit the number of redirects on your WordPress site. Each one adds a little extra load time. Especially if you have multiple redirects that send visitors to other redirects, and so on. Redirects are often unavoidable, but optimizing your site architecture early on will minimize them and avoid a messy referral chain.

  1. Turn off Pingbacks and Trackbacks.

Pingbacks and Trackbacks are two WordPress technologies that alert external websites when you link to them in your site content.

Pingbacks and trackbacks can be great for marketing efforts, as you let other websites know that you value their content, and you may receive backlinks in return.

However, many WordPress experts agree that the disadvantages outweigh the advantages here. Namely, they use up server resources unnecessarily and open the door to spammers and DDoS attacks. If you want to track backlinks, you can do so with an external analytics tool, and there are plenty of other effective methods to earn backlinks to your site.

In short, we recommend that you disable pingbacks and trackbacks. To do this, go to Settings> Go to your dashboard and uncheck the first two options, Attempt to notify… and Enable link notifications…

Speed ​​up your WordPress site by turning off pingbacks and trackbacks.

  1. Improving WordPress website speed – using CDN.

Another common reason for poor performance is distance. Your pages tend to load on devices that are further away from the physical location of your web server. This especially affects international users and users in remote areas. Fortunately, you can mitigate this effect with a content delivery network, or CDN for short.

A CDN is a global collection of connected web servers. Each server stores a copy of your website’s JavaScript, CSS, and image files. When a user requests a page on your site, the server closest to the user sends those files to them. A CDN gives your website global reach and consistent loading speeds for all visitors, near and far.

CDNs are easy to set up and manage on any WordPress site. Your web hosting provider will likely offer a CDN service as part of your plan or as a paid add-on, and your CDN takes care of all the content delivery for you. Popular CDNs include Cloudflare and StackPath.

  1. Compress files with GZIP.

GZIP is a widely used lossless compression method for sending files over the Internet. GZIP can reduce file sizes by up to 70%, and compresses files in much less time and with less computing power than other compression methods. When you apply GZIP compression to your website, your files will be sent to users faster because you use much less bandwidth than with an uncompressed file.

There are many plugins that can enable GZIP compression on your site. This is a common feature of speed optimization plugins, making the process as simple as checking a box. If your site is hosted on an Apache server (which it probably is), you can also enable GZIP compression manually by adding the following code to your .htaccess file:
<IfModule mod_deflate.c> AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml< /IfModule>

20. Restrict external scripts.

External scripts are code files that your website uses but are not stored on your web server. These types of scripts are common in third-party analytics tools and plugins like Google Analytics and Crazy Egg, ad networks like Google AdSense, and social media embeds like Click to Tweet. Many WordPress themes also rely on external scripts to load JavaScript files, CSS files, and other media.

External scripts aren’t always a bad thing. You’ll likely need at least a couple on your site to use the tools you want. Always weigh the drawbacks of adding plugins and additional tools that use external scripts, and consider whether the added functionality is worth trading for the potential performance hit.

  1. Don’t fall victim to hotlinking.

Many of these tips involve making changes to your website to optimize WordPress performance. However, with hotlinking, someone else is to blame.

Hotlinking is when one website uses a resource that is hosted on another website. When another website hotlinks to your resource, it displays it on its own website without the financial or performance cost of hosting the content themselves.

Let’s say I see a cool infographic on another website that I want to include in my blog post. The right thing to do would be to download the image, upload it to my server, and properly attribute the image. If I were to hotlink to the image (which is, to be more precise, the wrong thing to do), I would link to that file as the image source and load it from their site.

  1. Schedule tasks for low-traffic periods.

Scheduling background tasks is a great way to keep your website healthy without eating up a chunk of your day. Things like backups, updates, and security scans can be run automatically at regular intervals.

If you’re someone who likes to schedule these things, try running your background tasks during periods of lower traffic. This way, you’re not putting additional strain on a server that’s already handling a growing number of visitors. Check out your favorite traffic analysis tool to learn the best days and times of day to schedule tasks.

Additionally, consider adjusting the frequency of your background tasks if you still think there’s an impact on performance. For example, you could switch from running daily backups to running backups every other day or once a week.

  1. Splitting long posts into multiple parts.

If you’ve followed the steps above and are still unhappy with the load times on some pages, the problem may be that they simply contain too much content. Longer posts with a lot of images and dynamic information will always take longer to render – consider splitting them into multiple posts instead. This can usually be done without disrupting the user experience.

  1. Improving WordPress site speed by pagination of posts.

Alternatively, you can split long posts into multiple pages if you don’t feel a piece of work is worthy of multiple blog posts. This is beneficial not only for performance, but also for readability. For example, you can split a post into different sections by chapter to make it easier to process posts in chunks.

Note that this method is best for long posts with a lot of media, which would otherwise load more slowly than you want. Otherwise, keep your shorter posts on one page and minimize clicks between pages. To aid readability in this case, you can add a table of contents section with jump links to each section.

25. Note-taking.

You may not think of comments as content on your site, but WordPress must load your page’s comments section on the same page as your main site content. If your comments section is particularly active, you can save load time by pagination your comments (creating a separate page for your site’s comments). By placing comments on a separate page, you give the original page less content to load and let readers load comments on a post only if they want to.

Fortunately, WordPress allows you to easily create a separate page for your comments section: Navigate to Settings> Discussion, check the box next to Share comments to pages… and set the number of comments per page (50 by default).
Alternatively, you can disable your comments section by unchecking Allow people to post comments on new posts on the same screen.

Don’t waste time!

Like many aspects of managing a WordPress site, speed optimization is your responsibility. Fortunately, there are several strategies you can implement to optimize your load time and provide the fastest, most satisfying user experience. It’s worth investing a little of your time to save your site visitors a lot of time.

Contact Host Center today for WordPress website hosting – and get a free consultation.

The article was written by Jamie Jubiler – translated from English to Hebrew by Yahav Bengiat and Google Translate

Image by fsweb_de from Pixabay