Knowing how to preload key requests in WordPress is one of the most impactful steps you can take to improve your Core Web Vitals scores and deliver a faster, smoother experience to every visitor. Google's Core Web Vitals — Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS) — directly influence both user experience and search rankings, making performance optimisation a top priority for any WordPress site owner.
What Are Preload Key Requests and Why Do They Matter?
The "Avoid chaining critical requests" or "Preload key requests" audit appears in Google PageSpeed Insights and Lighthouse when your browser discovers important resources — like fonts, hero images, or critical CSS files — too late in the loading process. By the time the browser parses HTML, fetches a stylesheet, then discovers a font inside that stylesheet, precious milliseconds are lost.
Preloading tells the browser to fetch certain resources early, even before it would naturally discover them. This is done using the <link rel="preload"> HTML tag or an equivalent HTTP header. The resources most commonly worth preloading include:
- Web fonts (WOFF2 files)
- Hero or above-the-fold images (especially LCP images)
- Critical CSS files
- Key JavaScript files required for initial render
When used correctly, preloading can meaningfully reduce your LCP time, which is one of the three Core Web Vitals Google measures for page experience ranking signals.
How to Audit Your WordPress Site for Preload Opportunities
Before adding preload hints, you need to identify which resources are causing the problem. Running a proper audit saves time and prevents you from preloading resources that don't need it.
Using Google PageSpeed Insights
- Visit pagespeed.web.dev and enter your WordPress site URL.
- Click Analyze and wait for the report to generate.
- Scroll to the Opportunities section and look for "Preload key requests" or "Avoid chaining critical requests."
- Expand the audit to see exactly which files are flagged — note the file type (font, image, CSS, JS) and the full URL of each resource.
- Check the Diagnostics section for "Largest Contentful Paint element" to identify your LCP image or text block.
Using Chrome DevTools and Lighthouse
- Open your WordPress site in Google Chrome and press F12 to open DevTools.
- Click the Lighthouse tab and select Performance, then click Analyze page load.
- Review the Opportunities and Diagnostics panels for preload recommendations.
- Switch to the Network tab, reload the page, and filter by Font or Img to see when those resources are requested relative to page load start.
- Resources that appear late in the waterfall — especially those not requested until after other assets are fully loaded — are your best preload candidates.
How to Add Preload Tags in WordPress Manually
The most reliable way to add preload hints in WordPress is through your theme's functions.php file or a site-specific plugin. This method gives you precise control without relying on third-party plugin settings.
Preloading Fonts via functions.php
Open your child theme's functions.php file and add the following snippet. Replace the font URL with the actual path to your WOFF2 font file:
function my_preload_key_requests() {
echo '<link rel="preload" href="' . get_template_directory_uri() . '/fonts/my-font.woff2" as="font" type="font/woff2" crossorigin="anonymous">' . "\n";
echo '<link rel="preload" href="' . get_template_directory_uri() . '/css/critical.css" as="style">' . "\n";
}
add_action( 'wp_head', 'my_preload_key_requests', 1 );
Key points about this snippet:
- The
as="font"attribute tells the browser what type of resource is being preloaded — this is required for correct prioritisation. - The
crossorigin="anonymous"attribute is mandatory for fonts, even when they are self-hosted, because fonts are fetched using CORS. - The priority
1inadd_actionensures the preload tag outputs very early in the<head>. - For images, use
as="image"; for scripts, useas="script"; for stylesheets, useas="style".
Preloading the LCP Hero Image
If your LCP element is a hero image, preloading it can dramatically reduce your LCP time. Here is how to dynamically output a preload tag for a featured image or a static hero image:
function my_preload_lcp_image() {
// Static hero image example
$hero_image_url = get_template_directory_uri() . '/images/hero-banner.webp';
echo '<link rel="preload" href="' . esc_url( $hero_image_url ) . '" as="image">' . "\n";
}
add_action( 'wp_head', 'my_preload_lcp_image', 1 );
If your hero image is dynamic (set per page or post), you can retrieve it using get_the_post_thumbnail_url() and conditionally output the preload tag only on pages where that image appears above the fold.
Using WordPress Plugins to Preload Key Requests
If you prefer a no-code approach or need to manage preload hints across many pages, several well-maintained plugins can handle this for you.
WP Rocket
WP Rocket is a premium caching and performance plugin with built-in preload features. To configure preload hints:
- Install and activate WP Rocket from your WordPress dashboard.
- Go to Settings > WP Rocket and click the Media tab.
- Enable "Preload Fonts" and add the URLs of your WOFF2 font files in the provided field.
- Navigate to the File Optimization tab and enable "Preload CSS" if your theme supports critical CSS generation.
- Save changes and clear all caches, then re-run your PageSpeed Insights audit.
LiteSpeed Cache
LiteSpeed Cache is a free, feature-rich plugin that works on any hosting environment and includes preload controls:
- Install and activate LiteSpeed Cache.
- Navigate to LiteSpeed Cache > Page Optimization > Tuning.
- In the CSS Settings panel, locate the "CSS Preload" option and enter the URLs of critical stylesheets.
- In JS Settings, you can also defer or preload JavaScript resources.
- Save and flush the cache.
Perfmatters
Perfmatters is a lightweight performance plugin that includes a dedicated Preload tab:
- Install and activate Perfmatters.
- Go to Perfmatters > Options > Preload.
- Add font URLs, image URLs, or script URLs to the preload list.
- Enable "Preconnect" for third-party domains like Google Fonts or CDN origins.
- Save settings and test with PageSpeed Insights.
Advanced Preload Techniques for WordPress
Beyond basic link tags, there are additional strategies to further optimise resource loading and address Core Web Vitals audit failures.
Adding Preload via HTTP Headers with .htaccess
On Apache servers, you can send preload hints as HTTP headers instead of HTML tags. This is marginally faster because headers are processed before the HTML body is parsed. Add the following to your .htaccess file:
<IfModule mod_headers.c>
<FilesMatch "index\.php">
Header add Link "</wp-content/themes/my-theme/fonts/my-font.woff2>; rel=preload; as=font; type=font/woff2; crossorigin=anonymous"
</FilesMatch>
</IfModule>
Using Preconnect for Third-Party Domains
If you are loading Google Fonts or other third-party resources, preconnect establishes the TCP, TLS, and DNS connection early:
function my_preconnect_origins() {
echo '<link rel="preconnect" href="https://fonts.googleapis.com">' . "\n";
echo '<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . "\n";
}
add_action( 'wp_head', 'my_preconnect_origins', 1 );
Self-Hosting Google Fonts to Simplify Preloading
When you load Google Fonts from an external CDN, the browser must resolve DNS, connect, and then download the font — three extra steps. Self-hosting fonts eliminates two of those steps and makes preloading more effective:
- Use the Google Webfonts Helper tool (gwfh.mranftl.com) to download WOFF2 files for your chosen font.
- Upload the WOFF2 files to
/wp-content/themes/your-child-theme/fonts/. - Add
@font-facedeclarations in your theme's CSS, pointing to the local files. - Add a preload tag as shown earlier in this guide, targeting the WOFF2 file directly.
- Remove the external Google Fonts
<link>from your theme or use a plugin like Perfmatters to disable it.
Testing and Validating Your Preload Implementation
After adding preload hints, always verify they are working correctly before and after publishing changes. Incorrect preload hints can actually harm performance by consuming bandwidth on resources the page doesn't immediately use.
Verifying Preload Tags Are Output Correctly
- Visit your WordPress site and use View Page Source (Ctrl+U or Cmd+U).
- Search for
rel="preload"in the source. Confirm your tags appear near the top of the<head>section. - Confirm the
hrefattribute points to a valid, accessible URL by opening it in a new browser tab. - Check that the
asattribute is correct for the resource type (font, image, style, script).
Re-Running PageSpeed Insights After Changes
- Clear all WordPress caches (plugin cache, server cache, CDN cache).
- Wait two to three minutes, then run a fresh PageSpeed Insights report.
- Verify the "Preload key requests" audit is resolved or shows fewer flagged resources.
- Check your LCP score — a successful font or hero image preload should reduce it noticeably.
- Run the test three times and average the results for a reliable benchmark.
Checking for Unused Preloads
Chrome DevTools warns you about preloaded resources that were not used within a few seconds of page load. In the Console tab, look for warnings like "The resource was preloaded using link preload but not used within a few seconds." If you see this, remove or correct that preload tag — unused preloads waste bandwidth and can hurt performance rather than help it.
Frequently Asked Questions
What is the difference between preload, prefetch, and preconnect in WordPress?
Preload (rel="preload") fetches a resource needed for the current page immediately. Prefetch (rel="prefetch") fetches resources that may be needed for future navigation, at low priority. Preconnect (rel="preconnect") establishes a connection to a third-party origin early without downloading a specific file. For Core Web Vitals improvements, preload and preconnect are the most directly impactful.
Will preloading fonts fix my LCP score in WordPress?
Preloading fonts can improve LCP if your Largest Contentful Paint element is a text block rendered with a custom web font that was previously loading late. However, if your LCP element is an image, you should preload that image instead. Always check the "Largest Contentful Paint element" diagnostic in PageSpeed Insights to target the correct resource.
Can I add preload hints without editing WordPress theme files?
Yes. Plugins like WP Rocket, Perfmatters, and LiteSpeed Cache all provide UI-based preload settings that do not require any code editing. Alternatively, you can add a simple site-specific plugin with a few lines of PHP rather than editing your theme's functions.php, which ensures your changes survive theme updates.
How many resources should I preload in WordPress?
As a best practice, preload only two to five truly critical resources per page. Preloading too many resources competes for bandwidth and can delay the most important assets. Focus on your LCP image, one or two critical fonts, and key render-blocking CSS. Monitor your Lighthouse scores and network waterfall after each addition to ensure each preload is providing a measurable benefit.
Improving Core Web Vitals through resource preloading is a powerful but detail-oriented process — from auditing the right resources to writing correct HTML attributes and validating your changes. If you find WordPress performance tasks like these time-consuming or technically challenging, WP AI Agent is a tool that lets you manage and optimise your WordPress site through simple natural-language AI chat, handling complex tasks like preload configuration, cache management, and performance tuning without requiring deep technical knowledge.