Optimizing WordPress websites

A website is one of the first touchpoints for prospective customers and an important marketing tool to retain and grow customer engagement. Slow websites or pages, broken links, and non-performing scripts can impact website performance and create a poor experience for a site visitor, impacting growth in business opportunities and shedding negative light on the brand. A WordPress website could be performing slowly for a number of reasons, the usual suspects being infrastructure—high load due to large content file sizes, hosting capacity issues, misconfigurations, or large network distance between user and website host—or software glitches—image sizing, misconfiguration, incompatible versions, or clashing plugins. While it can be challenging to investigate what's causing a slow-down and identify how to optimize the site for better performance, thankfully there are tools and plugins that help.

Checking a WordPress website’s optimizable areas using tools

Site24x7 is a tool that checks the performance speed of a WordPress website.

WordPress.com states “A WordPress.com baseline site on a Business plan with built-in custom plugins and a default theme activated, loads in around 1 second.” A good target time for a full-fledged website or webpage load is between one and three seconds. WordPress.com further mentions that “4 to 5 seconds is the time that a site takes to load on average, across the web.” As a good practice, optimizing pages and images will lessen time to load a page or site.

The automated site performance tools mentioned above provide a general perspective on improvement possibilities for a faster website response. For example, a sampling of areas most tools touch upon includes:

  • Time (in seconds) that it took for the website to load fully.
  • Total page size with information on images, videos, scripts, and other files loaded. The lighter or smaller the page size, the faster the website performance.
  • Requests, which show the files that needed to be loaded for the site to be displayed fully. The fewer the requests,the fewer files needed to load and the faster the site performance. Some tools will show where the files are loaded from, how large they are, and how much time they take to load.

How to improve WordPress site performance

Typically, a slow performing WordPress website occurs due to infrastructure and/or software-related issues; however, slow performance can be contributed to a number of factors outlined below.

1. Check the web hosting configuration

a. There could be issues with the physical hosting. Hosting could be:

  • Shared: A shared host server supports several websites. While this is the most cost-effective way to get started, you can't do much to manage or improve web server settings to improve performance. Possible solutions in this scenario include caching, WordPress Performance, and content offloading.
  • External scripts such as advertisement spots, videos, and font loaders too could slow down the site if incompatibilities exist or performance from the source is slow

b. Hardware performance: Having multiple high speed processors, memory systems, and solid state devices, as well as higher disk storage capacity and internet bandwidth is important for faster processing and performance. For example, when the load increases on a server, higher processor speeds and memory process page requests quickly. Higher memory and speedy storage can help to cache pages and page requests, ensuring that the website systems aren't overwhelmed.

2. Consider other infrastructure factors that could impact performance

a. Location: If the location of the server and visitors of the site are geographically distant from each other, internet performance can impact user experience. This can be addressed by using a content delivery network (CDN), which mirrors static files (including images) and keeps them on CDN servers in selected geographic regions served, resulting in improved performance.

b.DNS: If high incoming traffic is expected on the site, having a separate Domain Name System (DNS) provider rather than hosting it on the same web server can help reduce the load on the web server.

c. Feeds: As explained on WordPress.com, “Feed is a function of special software that allows feedreaders to access a site, automatically looking for new content and then posting the information about new content and updates to another site. This provides a way for users to keep up with the latest and hottest information posted on different blogging sites. There are several different kinds of feeds, read by different feedreaders. Some feeds include RSS (alternately defined as “Rich Site Summary” or “Really Simple Syndication”), Atom or RDF files.”

  • The server load from Feeds can be moved from the main web server to another server, or even sent out to an external service provider. Service providers handle the traffic and pull information in regular intervals from the main web server, reducing traffic

d. Security: Defensive implementations and applications should be in place to prevent malicious traffic like login brute-force attacks, denial-of-service (DOS) attacks, and hotlinking attacks, wherein high traffic pages may be redirected to a website link or image.

3. Optimize software

a. To prevent exploitation of known vulnerabilities and to access the latest performance enhancements, ensure that the latest updates and patches are applied to the website software including WordPress itself, the server operating system (Linux/Windows/other), and supporting applications (Apache, MySQL, MariaDB, PHP).

  • Optimize and accelerate PHP through available tools and settings
  • Manage the software and hardware caching used by MySQL/MariaDB applications
  • If external code like JavaScript has been inserted into the website or theme, ensure that it doesn't slow down the site due to suboptimal coding

4. Minimize plugins

a. Most HTTP page requests come from plugins, and every installed plugin adds a bit of weight to the site. Only enable plugins that are being used, and disable and delete other plugins.

b. Plugins use server resources. The more plugins are enabled, the more computing resources are needed. Monitor resource needs, and ensure that sufficient resources are apportioned appropriately

c. If you suspect that a plugin is slowing down a site, consider a trial approach where you disable one plugin at a time and check the performance. Sometimes a combination of plugins may clash for resources and slow down the site.

d. Keep plugins updated with the latest versions and patches. Work with plugin support desks and user forums if the plugin is important but appears to slow down the site.

5. Optimize content

WordPress theme
  • The selected theme and the images added have a big effect on a site’s performance. The smaller the theme and images (in Kb), the quicker the website will load for the visitor.
  • External scripts such as advertisement spots, videos, and sometimes font loaders can slow down the site if incompatibilities exist or the performance from the source is slow.
Graphic and image size
  • Graphics and images are part of building up the brand and communication of a website. They can be included in posts, blogs, and individual pages. Optimizing these images using third-party image compression tools and plugins helps speed up performance and search engine rankings. Tools exist to help resize, condense, and optimize images in standard formats like JPG, GIF, and PNG.
  • Manage loading speed for graphics and images using approaches like lazy load, where only the images seen in the browser window are downloaded first. As the visitor scrolls, the remaining images are downloaded. This makes the user experience faster since the site loads only the portion being viewed rather than waiting for all the images on the page to download before displaying the site.
Compression
  • Compression technologies like GZIP compression compress content files like HTML, CSS, and JavaScript when responding to a user’s browsing request. The user’s browser receives compressed files quicker, and due to lower file size, these compressed files are uncompressed by the user’s browser and displayed. Most browsers support this technology.
  • Minify CSS, HTML, and JavaScript files, which are used in themes to describe how HTML elements are to be displayed on visual interfaces like screens. It's not unusual for HTML and CSS coding to have gaps known as white spaces, block limiters, unused characters, and symbols. When a browser reads this incoming data and extracts the instructions to display the webpage, the website will respond faster without those gaps in the code.

Note:

  • Caching: Every time a website receives a request, certain information is pulled and sent out. Saving the information requested and indexing it for limited periods of time and enabling quick access to this information if requested again is known as caching. This is commonly used on information that can easily be converted to static files, like CSS, JavaScript, images, and posts or blogs.
  • WordPress Performance: This feature is available in Business and eCommerce plans and can be accessed from My Site > Settings > Performance. Options include: speed up search within the website, accelerate the website, load images smartly, lazy load (which only loads images that are visible on the page), and make mobile page loads faster.
  • Content offloading: Using a CDN makes server hosts available to distribute a subscribing website’s static content from a location closer to the user, making downloading content faster due to lower latency.
  • Server optimization: This involves optimizing the server operating system (Linux/Windows), applications supporting WordPress (Apache, MySQL, MariaDB, PHP), and their related settings to work most efficiently with available hardware and resources on the server.

WordPress speed optimization plugins:

1. WP Super Cache

WP Super Cache by Automattic is a free plugin that includes a number of caching features that speed up a website. These include GZIP compression, page cache, cache preloading, CDN support, advanced cache preload, and more. Highlights include:

  • A comprehensive settings section with a separate tab to help with setup.
  • A feature to let you preload content into the cache.
  • A tool to help you connect to a CDN of your choice.
  • An advanced settings area where configuration options include:
    • Gzip compression
    • Browser caching
    • How to cache content
    • How often to update the cache

WP Super Cache details

  • Version: 1.7.2
  • Active installations: 2+ million
  • WordPress version: 3.1 or higher
  • Tested up to: 5.7
  • PHP version: 5.2.4 or higher

2. WP Fastest Cache

WP Fastest Cache is a caching plugin that enables pace caching with just the check of a box.

The free version supports
  • Gzip compression
  • Browser caching
  • Basic minification for HTML and CSS (but not JavaScript).
  • Option to disable WordPress emojis.
  • Exclude rules to exclude certain users/ or ontent from caching.
  • A tool to help you integrate with CDNs
The Premium version offers more optimization features:
  • Image optimization
  • Database optimization
  • More advanced minimization, including support for JavaScript minimization.
  • A tool to eliminate render-blocking JavaScript resources.
  • Option to load Google Fonts asyncronously
  • Lazy loading
WP Fastest Cache details: https://wordpress.org/plugins/wp-fastest-cache/
  • Version: 0.9.1.6
  • Active installations: 1+ million
  • WordPress version: 3.3 or higher
  • Tested up to: 5.7

3. W3 Total Cache

W3 Total Cache by BoldGrid is a feature-rich caching plugin that expects users to be at a level higher than beginners or casual users to get most out of the tool. It allows control of many caching aspects on a site. Highlights include:

  • Helps with file minification and connecting to a CDN of choice
  • Improves the SEO and user experience by increasing website performance and reducing load times using features like CDN integration
  • Key features:
    • Page caching
    • Browser caching
    • Database caching
    • Object caching
    • Fragment caching
W3 Total Cache details:
  • Version: 2.1.1
  • Active installations: 1+ million
  • WordPress version: 3.8 or higher
  • Tested up to: 5.7
  • PHP version: 5.3 or higher

Summary

Unoptimized websites impact performance and create a poor experience for a site visitor, in turn impacting growth and brand reputation. A WordPress website may be running slowly due to infrastructure or software-related issues, and tools can be used to identify other factors that impact performance. To combat these issues, consider various solutions in web hosting configuration, hardware optimization, infrastructure-related interventions, software, and content optimization.

Was this article helpful?

Write For Us

Write for Site24x7 is a special writing program that supports writers who create content for Site24x7 "Learn" portal. Get paid for your writing.

Write For Us

Write for Site24x7 is a special writing program that supports writers who create content for Site24x7 “Learn” portal. Get paid for your writing.

Apply Now
Write For Us