Troubleshoot Site Performance – WordPress.com Developer Resources Skip to content

Troubleshoot Site Performance

As a developer, ensuring optimal performance is a critical part of delivering a high-quality user experience and maintaining client satisfaction.

While WordPress.com optimizes many aspects of performance at the host level, performance issues can manifest in other ways at the user level. This guide covers the most common user-level performance issues you may encounter and shows you how to troubleshoot and optimize them on your WordPress site.

How to Measure Frontend Site Performance

Frontend site performance is measured with Core Web Vitals, a set of three metrics introduced by Google to evaluate a web page’s overall performance. Optimizing these metrics is crucial for improving both user satisfaction and search performance.

The three Core Web Vitals are:

  • Largest Contentful Paint (LCP) measures the time it takes for the largest content element on the screen to load, usually an image, video, or a substantial block of text. 
  • Interaction to Next Paint (INP) measures the latency from when a user initiates an interaction (like a click or key press) to the next time the browser renders a frame in response to that interaction.
  • Cumulative Layout Shift (CLS) measures a webpage’s visual stability by tracking how often elements shift unexpectedly during loading.

While there are many tools out there for measuring a website’s speed and performance, we recommend Jetpack Boost. Use Jetpack Boost on your website to view a dashboard that shows your core web vitals scores for both desktop and mobile:

The Boost section in Jetpack with a black Boost Your Site button

Other tools out there include Google PageSpeed Insights, Google Lighthouse, GTmetrix, and WebPageTest. These automated site performance tools give general recommendations and can help identify best practices and opportunities for increased site speed. However, these tools don’t recommend solutions that are tailored for your WordPress.com-hosted website, so continue to the next section for actionable steps you can take to improve your site’s Core Web Vitals scores.

Practical Steps to Optimize Core Web Vitals on WordPress.com

If you surface any frontend performance issues, the following could be the culprit. Below you’ll find the most common causes of a slow website on the front end, as well as solutions to rectify each issue.

Optimize Your Site’s Images

When images are too large, it can put additional strain on the server, affect user experience, and ultimately increase page load time.

A WordPress website can have any number of themes, layouts, and other factors that determine the recommended image size. Therefore, there’s no one-size-fits-all approach for all websites—you’ll want to find the right balance between images that are small enough to load quickly but large enough to appear high-quality.

A good rule of thumb is to upload images that are 1.5 to 2 times the width of your content area. If the content area is 600px, a 1200px-wide photo, served full size, should look crisp and high-quality while still having a relatively small file size.

To see if large images are negatively impacting your site speed and performance, you can use Jetpack Boost. Jetpack Boost highlights images that are too large. When you browse your site, the image guide will show your admin users an overlay with information about each image’s size:

Jetpack Boost overall score page

It will show you the current Image File Dimensions and the Expected Dimensions, i.e., the suggested ideal size of the image in order for it to be loaded on the page as quickly as possible. We recommend optimizing your images in one of the following ways:

Identify Inefficient Plugin Usage

Out of the box, a WordPress.com website is lightning-fast. If you’re experiencing a slow WordPress.com site, the introduction of suboptimal code, most commonly in the form of plugins and third-party themes, may be to blame.

Every plugin installed on a WordPress site has the potential to impact performance, so keep in mind the following best practices:

  • Test every new plugin on a fresh staging site to check how it affects performance.
  • Install one plugin at a time on your live site to see how it affects your page loading times. Installing multiple plugins at once makes it difficult to determine which plugin is compromising performance.
  • Update your plugins regularly to ensure your site includes the latest performance optimizations from the plugins’ developers. WordPress.com includes automatic plugin updates and scheduled plugin updates.
  • Regularly review the plugins installed on the site and remove the ones that are no longer necessary.

If you’re experiencing a slow website and are unsure which plugin(s) could be responsible, deactivate one plugin at a time to see how that improves load times on your website’s most important pages.

After identifying plugins that are slowing down your site, you can remove them if not needed, find better-performing alternatives, or get in touch with plugin developers to highlight the issues.

Defer or Remove Third-Party Scripts

When incorporating third-party services such as ads, social media buttons, or analytics trackers into your WordPress site, it’s often necessary to add external scripts to your HTML. However, these third-party scripts can hinder your page load performance, which in turn affects user experience and search engine rankings.

Tools like Google Lighthouse can audit your site’s web performance and flag pages that suffer from third-party code slowing down the page load time.

To minimize the negative impact of third-party code on your site, use Chrome DevTools or Lighthouse to identify which third-party scripts are causing performance issues. You can then remove unnecessary scripts or defer the scripts from loading until they are absolutely necessary. Jetpack Boost includes the option to defer non-essential JavaScript to ensure scripts do not impact the page load and degrade performance.

Optimize Large CSS Files

Depending on your site’s theme and customizations, CSS files can be quite large, and even larger with any plugins that include additional CSS. Large CSS files require the web browser to process a large amount of information to display your content.

Jetpack Boost can help you optimize how CSS is loaded. It includes one-click settings to move critical CSS information to the start of the page (helping pages display your content sooner) and concatenating CSS to reduce site loading time and reduce the number of requests.

How to Measure Backend Site Performance

Backend performance is measured by your site’s time to first byte (TTFB). TTFB is the time from the moment a client makes an HTTP request to when it receives the first byte of the response from the server. 

A performant website has a TTFB at or below 0.50 seconds. To measure your site’s TTFB, you can use a tool like WebPageTest or your browser’s developer console (instructions for Chrome here). The Debug Bar plugin is also a useful tool that shows query, cache, and other helpful debugging information in your admin bar.

For a WordPress developer, optimizing TTFB involves enhancing server performance, efficiently querying databases, and leveraging caching mechanisms to reduce server processing time.

Practical Steps to Optimize TTFB on WordPress.com

If you identify any backend performance issues, the following could be the culprit. Below you’ll find the most common causes of a slow website, as well as solutions to rectify each issue.

Review Your Site’s Caching Functionality

WordPress.com stores a cached version of the page to load it more quickly. Future visitors will receive the cached version for five minutes, after which a fresh render of the site will be used.

If caching is not working at an optimal level, we recommend reviewing the following options on your website:

Remove Caching Plugins

As a developer, one of your first tasks might be to install page caching on your website. But WordPress.com has caching built in, so installing a caching plugin is not necessary and can even compromise the existing caching functionality and page load time. 

Built-in WordPress.com caching will always be faster and more efficient than any WordPress page-caching plugin, so leave your page caching to us at the server level. While troubleshooting, you can clear your site’s cache in the Hosting Configuration or by using WP-CLI via SSH.

Check Cookie Headers

Certain plugins may attempt to set cookies on each page load, which can cause the page caching to stop working because they attempt to set a cookie on every request.

To identify if your site has a cookie being set using headers, take the following steps:

  1. Open the browser’s developer tools. If using Chrome, this can be reached with the keyboard shortcut OPTION + COMMAND + I.
  2. Click on the “Network” tab.
  3. Navigate to the website you wish to troubleshoot and select the first request made.
  4. Under “Response Headers,” look for a set-cookie header response that will appear if a plugin is setting cookies in the header:
a screenshot of chrome's dev tools with a red box and arrow around the set-cookie header response

A good way to identify the plugin or theme responsible is to first look at the cookie name. If it’s not clear from the name, then deactivate plugins one by one, and refresh the page with the developer tools Network tab open (being sure to clear the network log first) to see if the cookie continues to be set.

Once you identify a theme or plugin on your site that is setting a cookie with every request, you can either remove it or contact its developers to ask for a patch.

Enable Global Edge Cache

WordPress.com’s Global Edge Cache makes your site load faster for visitors around the world by taking advantage of our global network of data centers. Enabling this caching feature brings your content closer to your visitors, wherever they might be—this means faster load times, less waiting, and a better overall experience.

Many hosts charge extra for this kind of edge caching or require integration with a third-party provider. On WordPress.com, global edge caching is included on every plan without any bandwidth restrictions.

Choose a Primary Data Center

WordPress.com sites with a Business plan are automatically added to the optimal data center upon activating its hosting features. Our edge cache is global, but moving the origin server closer to your primary user base may help with the network.

If you’d like to choose a specific data center for your site, take the steps in our Choose Your Site’s Primary Data Center guide.

Optimize Your Database

Optimizing a WordPress site’s database can improve its performance and efficiency. As the database grows with content, comments, user data, and plugin-related data, it can become bloated and slow, leading to longer query times and increased server load.

Because of the risks of data loss, we strongly recommend that only experienced developers modify the database. While working with the database, take care to test your modifications on a fresh staging site first. Real time backups are included in the WordPress.com Business and Commerce plans, but there is certain data that is not backed up. Learn more about WordPress.com backups here.

Here are several strategies to effectively optimize your WordPress database:

  • Remove unused data like post revisions, auto-drafts, and spam comments to help keep the database lean and fast. 
  • Delete old and unused plugins and their data to further reduce clutter and improve performance.
  • Optimize database tables through phpMyAdmin to improve access speed. Adding custom indexes to columns frequently used in search queries or JOIN operations can also significantly speed up query performance. However, this should be done cautiously, as improper indexing can actually increase the database size and degrade performance.

Avoid Redirects

Redirects can significantly slow down your page load speed. When a browser requests a resource and encounters a redirect, the server sends a response indicating the new location. The browser must then request the resource from this new location, adding additional network trips that can delay resource loading by hundreds of milliseconds.

While redirects are often necessary and harmless, multiple redirects create unnecessary delays in loading your content, which can negatively impact user experience and search engine rankings. Tools like Google Lighthouse will flag your page if it has multiple redirects—a page fails the Lighthouse audit if it has two or more redirects. 

To improve performance, update your links to point directly to the resource’s current location. Ensuring that links point directly to the correct resource location minimizes delays caused by unnecessary redirects.

Reduce Items Per Page

Speed issues can happen if the number of items per page is too high on WP-Admin sections such as Posts, Pages, and WooCommerce Products. Since the number of items per page on the dashboard is set per user, the page might load for an Administrator but fail to load for another user.

It is possible to update the number of items per dashboard page for Posts, Pages, and Products by running this query on phpMyAdmin:

UPDATE wp_usermeta SET meta_value = 10 WHERE wp_usermeta.meta_key = 'edit_post_per_page';

UPDATE wp_usermeta SET meta_value = 10 WHERE wp_usermeta.meta_key = 'edit_page_per_page';

UPDATE wp_usermeta SET meta_value = 10 WHERE wp_usermeta.meta_key = 'edit_product_per_page';

We recommend testing this on a fresh staging site first to ensure there are no unexpected side effects. After running the query, you must clear the site cache or run wp cache flush via SSH to apply the changes.

How Your Host Optimizes Your Site

The following factors can typically slow down a WordPress site, but these factors are not applicable to a site hosted on WordPress.com. Here at WordPress.com, we manage the more technical aspects of site speed, so you don’t have to:

  • Host Servers: WordPress.com servers are optimized to ensure a lightning-fast experience for your website’s visitors.
  • WordPress Version Updates: We test and update every WordPress release, ensuring your site is always running the latest features and standards.
  • PHP Version Updates: We ensure your site has access to the latest compatible versions of PHP.
  • Caching mechanisms: WordPress.com sites include caching to serve static content and reduce server load.
  • Fast themes: Third-party themes often include extra features that may slow down your site. Choose a WordPress.com theme––all of our themes are optimized for speed.
  • Content Delivery Network (CDN): A built-in CDN distributes your website’s content across multiple servers worldwide, reducing server load and improving load times for users in different geographic locations.
  • High Traffic Loads: WordPress.com includes automated burst scaling to ensure your website will never slow down or crash as a result of heavy traffic spikes or excessive concurrent users.

Last updated: August 05, 2024