Back to Community

Troubleshooting WP-Optimize Cache Preload Issues: Stuck URLs and Common Fixes

15 threads Sep 16, 2025

Content

Many users of the 'WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance' plugin rely on its cache preload feature to warm up their site's cache. A frequent issue reported is the preload process getting stuck on a specific number of URLs, such as "Preloading posts found in sitemap: 78 out of 618 URLs preloaded," and failing to complete. This guide will explain why this happens and walk you through the most common solutions.

Why Does the Preload Get Stuck?

The preload process can halt for several reasons, often related to server configuration or resource limits:

  • PHP Timeouts: Your server may have a strict max_execution_time limit in PHP, killing long-running processes before preload can finish.
  • Insufficient Memory: Preloading a large number of URLs can require significant memory. If PHP's memory_limit is too low, the process may fail.
  • Problematic URLs: The preload might encounter a specific URL that causes an error, such as a very slow-loading page or one that returns an HTTP error, stalling the entire queue.
  • Server Configuration: Some servers are not configured to allow PHP scripts to run in the background after a browser connection is closed, which can interrupt the process.

Common Solutions to Try

1. Enable Debugging to Find Errors

The first step is to check for underlying PHP errors that might be causing the preload to fail.

  1. Access your server via FTP or your hosting control panel's file manager.
  2. Locate and edit the wp-config.php file in your site's root directory.
  3. Find the line that says define('WP_DEBUG', false);.
  4. Replace it with the following lines:
    define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', false);
    define('WP_DEBUG_LOG', true);
  5. Save the file and run the preload again. This will create a debug.log file in your /wp-content/ directory. Check this log for any errors that occur during the preload process.

2. Increase PHP Limits

Ask your web host to increase your PHP's max_execution_time and memory_limit. This is a very common fix for preloads that fail on larger sites.

3. Use WP-CLI (Advanced)

If the preload works in the browser but gets stuck reporting progress, the issue may be with how your server handles background tasks. You can bypass this by running the preload via WP-CLI, a command-line tool for WordPress.

The command is simply: wp optimize cache preload

If you have server access, this is often the most reliable method to preload your cache completely.

4. Adjust the Preload Delay

In some cases, adding a longer delay between preload requests can prevent timeouts. You can add a custom filter to your theme's functions.php file:

add_filter('wpoptimize_preload_delay', 'custom_preload_delay');
function custom_preload_delay($preload_delay) {
    $preload_delay = 2000000; // Delay in microseconds
    return $preload_delay;
}

5. Check Your Sitemap

The preload feature uses your XML sitemap to find URLs. Ensure your sitemap is accurate and does not contain a large number of low-priority URLs (like images) that could be slowing down the process. If necessary, consult your SEO plugin's documentation on customizing your sitemap.

Conclusion

A stuck preload is usually a server resource issue, not a problem with the plugin itself. By methodically enabling debugging, increasing PHP limits, and considering alternative methods like WP-CLI, you can usually get your cache preload running smoothly again.

Related Support Threads Support