Hi, is there any hook / action to customize / use the plugin features, for example crawl a custom url / custom sitemap with unique headers / cookies / useragent? – For example when i update a post, it is linked to several other posts / sites which need a purge and a new crawl – something like this possible ?
regards
]]>Currrently all our sites are down (white screen of death) because of the following issue:cache-warmer/src/class-extend-wp-cli.php:21 Class "WP_CLI" not found
Version on server is 1.3.4. Update to 1.3.7 is available but doesn’t get installed through cron.
Forcing an upgrade to 1.3.7 through WP CLI has fixed the problem it seems.
May I suggest to add some automated tests in your plugin to prevent situations like this.
]]>Cache Warmer is currently sending lots of 500k+ responses (size after compression) via Ajax that have to be buffered to disk (which is slow)
an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/4/43/0000001434 while reading upstream client request: “POST /wp-admin/admin-ajax.php HTTP/2.0” upstream: “https://unix:/run/nginx.sock:/wp-admin/admin-ajax.php”
Can such requests be optimised?
]]>Amazing plugin thanks for creating it. For using the Yoast sitemap, for example with my site, https://www.ryansmithphotography.com/sitemap_index.xml. Do I add this as entry point 1 then also click the “Add sitemaps of entry points as entry points” checkbox. It wasn’t real clear on how to warm from a sitemap instead of crawling the site. Thanks!
]]>I’ve updated to latest version and I’ve tried the new WP-CLI commands but it doesn’t seems to work. When I type:
wp cache-warmer start
I get this error:
Error: 'cache-warmer' is not a registered wp command. See 'wp help' for available commands.
So the WP-CLI command is not being registered as it should.
]]>Hi,
I just updated to V1.3..4 and my site got a fatal error – error details below.
Luckily WP recovery mode let me sort it out and deactivate the plugin and then site working again fine.
Can you please take a look:
`Error notification
For site
https://tourismsuccess.com
? Error Level:
E_ERROR
? Message:
Uncaught Error: Class “WP_CLI” not found in /home/iu1gpez/public_html/wp-content/plugins/cache-warmer/src/class-extend-wp-cli.php:21
Stack trace:
#0 /home/iu1gpez/public_html/wp-content/plugins/cache-warmer/cache-warmer.php(170): Cache_Warmer\Extend_WP_CLI->__construct()
#1 /home/iu1gpez/public_html/wp-includes/class-wp-hook.php(324): Cache_Warmer\Cache_Warmer->Cache_Warmer\{closure}()
#2 /home/iu1gpez/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#3 /home/iu1gpez/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/iu1gpez/public_html/wp-settings.php(700): do_action()
#5 /home/iu1gpez/public_html/wp-config.php(108): require_once(‘/home/iu1gpez/p…’)
#6 /home/iu1gpez/public_html/wp-load.php(50): require_once(‘/home/iu1gpez/p…’)
#7 /home/iu1gpez/public_html/wp-blog-header.php(13): require_once(‘/home/iu1gpez/p…’)
#8 /home/iu1gpez/public_html/index.php(17): require(‘/home/iu1gpez/p…’)
#9 {main}
thrown
? File:
/wp-content/plugins/cache-warmer/src/class-extend-wp-cli.php
? Line:
21
? Request:
/favicon.ico
Thanks.
Dale.
Hello.
So i have a woocommerce store running in a shared provider, powered by wp-rocket and i also use Sqlite Object cache. And this setup runs fast.
I would like to try Cache Warmer but i read somewhere that cache warmer “warming” algorithm might conflict with WP-Rocket preload cache, and i should disable “activate preloading” in WP-Rocket.
Will this be enough for WP-Rocket to play along with Cache Warmer, and to take advantage of the performance of both plugins working together? Or is there something more i should do?
Which options you do recommend to enable / disable in both Wp-rocket and Cache warmer? Or you do not recommend to use both plugins together? Any help would really be appreciated.
Thanks in advance
]]>Firstly this plugin has been amazing and exactly what i needed to pre-warm key pages from my sitemap.
However, somewhere between version 1.2.5 and 1.3.2 the scheduled warmup has stopped working. Will only run manually.
I therefore reverted back to version 1.2.5 and the schedulder is working again so not site related.
Please can you fix this as want to keep aligned to latest version.
I’ve exported my settings below in case this helps with any troubleshooting.
{“cache-warmer-setting-depth”:”1″,”cache-warmer-setting-user-agents”:[{“value”:”Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/119.0.0.0 Safari\/537.36″},{“value”:”Mozilla\/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/15.0 Mobile\/15E148 Safari\/604.1″}],”cache-warmer-setting-cookies”:[],”cache-warmer-setting-interval”:”30″,”cache-warmer-setting-url-params”:[],”cache-warmer-setting-request-headers”:[],”cache-warmer-setting-entry-points”:[{“url”:”https:\/\/boulderflash.com\/page-sitemap.xml”},{“url”:”https:\/\/boulderflash.com\/product_cat-sitemap.xml”},{“url”:”https:\/\/boulderflash.com\/category-sitemap.xml”},{“url”:”https:\/\/boulderflash.com\/post-sitemap.xml”}],”cache-warmer-setting-timeout”:”30″,”cache-warmer-setting-visit-second-time-without-url-params”:”null”,”cache-warmer-setting-visit-second-time-without-cookies”:”null”,”cache-warmer-setting-rewrite-to-https”:”null”,”cache-warmer-setting-speed-limit”:”1000″,”cache-warmer-setting-exclude-pages-with-warmed-canonical”:”1″,”cache-warmer-setting-for-how-many-days-to-keep-the-logs”:”1″,”cache-warmer-setting-assets-preloading-scripts”:”null”,”cache-warmer-setting-assets-preloading-styles”:”null”,”cache-warmer-setting-assets-preloading-images”:”null”,”cache-warmer-setting-assets-preloading-fonts”:”null”,”cache-warmer-setting-warm-up-posts”:”null”,”cache-warmer-setting-posts-warming-enqueue-interval”:”3″,”cache-warmer-setting-external-warmer-license-key”:””,”cache-warmer-setting-excluded-pages”:[“checkout”,”basket”,”https:\/\/boulderflash.com\/category\/news\/”],”cache-warmer-setting-add-this-site-all-public-posts”:”null”,”cache-warmer-setting-add-entry-point-sites-sitemaps”:”null”,”cache-warmer-setting-use-object-cache”:”null”,”cache-warmer-setting-excluded-pages-use-regex-match”:”null”}
Thanks
]]>Last week I set a warmup schedule for my sites, which worked great. After several days the schedule broke, and now it just won’t run with the scheduler. When I try to manually run the hook via the Action Scheduler tools page, it tries to run for 5 minutes and fails with a timeout error.
What can I do to make it function again?
Thank you!
]]>Currently, although the legend say On their publication and edit
, the implementation doesn’t trigger the warmer upon edit.
public function populate_enqueue( $new_status, $old_status, $post ) {
if ( 'publish' === $new_status ) {
$posts_enqueue = Cache_Warmer::$options->get( 'cache-warmer-posts-enqueue' );
if ( ! in_array( $post->ID, $posts_enqueue, true ) ) {
$posts_enqueue[] = $post->ID;
Cache_Warmer::$options->set( 'cache-warmer-posts-enqueue', $posts_enqueue );
}
}
}
Here’s an example of a trigger that does respond to an edit, from the CF page cache plugin:
$purge_actions = array(
'deleted_post', // Delete a post
'wp_trash_post', // Before a post is sent to the Trash
'clean_post_cache', // After a post’s cache is cleaned
'edit_post', // Edit a post - includes leaving comments
'delete_attachment', // Delete an attachment - includes re-uploading
'elementor/editor/after_save', // Elementor edit
'elementor/core/files/clear_cache', // Elementor clear cache
);
foreach ($purge_actions as $action) {
add_action($action, array($this, 'purge_cache_on_post_edit'), PHP_INT_MAX, 2);
}
function purge_cache_on_post_edit($postId)
{
static $done = [];
if (isset($done[$postId])) {
return;
}
// Do not run this on the WordPress Nav Menu Pages
global $pagenow;
if ($pagenow === 'nav-menus.php') return;
if (($this->main_instance->get_single_config('cf_auto_purge', 0) > 0 || $this->main_instance->get_single_config('cf_auto_purge_all', 0) > 0) &&
$this->is_cache_enabled()) {
$current_action = function_exists('current_action') ? current_action() : "";
$this->modules = $this->main_instance->get_modules();
$error = '';
$validPostStatus = ['publish', 'trash', 'private'];
$thisPostStatus = get_post_status($postId);
if (get_permalink($postId) != true || !in_array($thisPostStatus, $validPostStatus)) {
return;
}
if (is_int(wp_is_post_autosave($postId)) || is_int(wp_is_post_revision($postId))) {
return;
}
if ($this->main_instance->get_single_config('cf_auto_purge_all', 0) > 0) {
$this->purge_all();
return;
}
$savedPost = get_post($postId);
if (is_a($savedPost, 'WP_Post') == false) {
return;
}
$urls = $this->get_post_related_links($postId);
$this->purge_urls($urls);
$this->modules['logs']->add_log('cache_controller::purge_cache_on_post_edit', "Purge Cloudflare cache for only post id {$postId} and related contents - Fired action: {$current_action}");
$done[$postId] = true;
}
}
]]>
Hello,
I tried using regex to exclude all products under a woocommerce category like this: /product-category/(.*)
but started giving 404 error on all those product links when starting the warmer.
Am I using regex right ?
Thank you
]]>Currently, the code relies on the src
attribute in <img>
elements and so can’t find lightbox images used by page builders such as Elementor, which live in <a>
elements.
It would be really nice if this plugin could also search for image extensions in such href
links.
The legend currently says
Depth “0” means visiting no children pages (only entry points).
followed by the section where one selects assets for preloading.
It can be improved by pointing out that depth ‘0’ also effectively disables assets preloading, eg
Depth “0” means visiting no children pages or assets (only entry points).
Better still would be to grey out the assets preloading section on refresh if ‘0’ is entered.
]]>Great plugin!
Just reporting the following error:
WordPress database error Incorrect DATETIME value: '0' for query
SELECT
logs.*,
list.warmed_at,
user_agents.value AS user_agent
FROM wp_cache_warmer_warm_ups_logs AS logs
LEFT JOIN wp_cache_warmer_warm_ups_list AS list ON logs.list_id = list.id
LEFT JOIN wp_cache_warmer_warm_ups_user_agents AS user_agents ON logs.user_agent_id = user_agents.id
WHERE list.warmed_at = '0'
ORDER BY logs.id ASC
LIMIT 100 OFFSET 0
made by do_action('cache-warmer_page_cache-warmer-logs'), WP_Hook->do_action, WP_Hook->apply_filters, Cache_Warmer\Admin_Menu->Cache_Warmer\{closure}, require_once('/plugins/cache-warmer/src/templates/admin/screens/logs.php'), Cache_Warmer\Logging::get_log_content
]]>
The logview page currently has a fixed max-width of 1050px, which forces users to have to scroll horizontally to view log contents row-by-row. Please make the page responsive or remove this CSS property entirely.
]]>Hello Forum,
Using Cache Warmer in combination with the Breeze Cache plugin. Since I’m not an expert in cache techniques, it would help me to find some guide lines for doing the most effective crawler and schedule settings. Can I find a manual or recommended settings somewhere?
Thanks!
Laurens
Hi
Is there a way to warm cache for user roles.
i.e. customer-role-a, customer-role-b, customer-role-c etc.
So roles, not users ??
]]>Please, can you advise me to get a similar behaviour as in the Litespeed crawler with
– Guest – Webp
– Guest
The cache for Guest (which is used on mobile (iPhone)) does not seem to be warmed.
Thx in advance!
hleen
]]>How can I force the start of the cache warming process from PHP code? Specifically, after staging push to production, I do clear the cache in production environment using PHP code, and now I also want to trigger cache warming using PHP. Just like pressing “Start a new Warm-Up” button, but from code.
]]>Hi there, first I want to thank you for your fantastic plugin.
It helped us to overcome problems with our WP Rocket Preload, which ended preloading after the first few pages.
My question – WP Rocket has some functions, which clean the cache at night (rocket dynamic list updates f.e.)
Is it with Cache warmer possible to
a) trigger the cache warmer process via cronjob or
b) set an exact time to start the cache warming
As I understand at the moment it is only possible to set a timer starting from the last warm up proccess. (every N-minutes)
Thank you
]]>I got the ERROR after i activated SchedulePress Plugin and Cache Warmer plugin
Cache Warmer Version 1.3.0
SchedulePress : Version 5.1.3?
And i could NOT “Start a NEW Warmup”
[05-Jul-2024 10:09:05 UTC] PHP Fatal error: Uncaught Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in public_html/wp-content/plugins/cache-warmer/vendor/guzzlehttp/guzzle/src/functions.php:61
Stack trace: #0 /public_html/wp-content/plugins/wp-scheduled-posts/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
#1 /public_html/wp-content/plugins/wp-scheduled-posts/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create()
#2 /public_html/wp-content/plugins/cache-warmer/vendor/vipnytt/sitemapparser/src/SitemapParser.php(525): GuzzleHttp\Client->__construct()
#3 /public_html/wp-content/plugins/cache-warmer/vendor/vipnytt/sitemapparser/src/SitemapParser.php(249): vipnytt\SitemapParser->getClient()
#4 /public_html/wp-content/plugins/cache-warmer/vendor/vipnytt/sitemapparser/src/SitemapParser.php(193): vipnytt\SitemapParser->getContent()
#5 /public_html/wp-content/plugins/cache-warmer/src/class-ajax.php(315): vipnytt\SitemapParser->parse()
#6 /public_html/wp-includes/class-wp-hook.php(324): Cache_Warmer\AJAX::start_warm_up()
#7 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#8 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#9 /public_html/wp-admin/admin-ajax.php(192): do_action() #10 {main} thrown in /public_html/wp-content/plugins/cache-warmer/vendor/guzzlehttp/guzzle/src/functions.php on line 61
Hi,
since version 1.2.0 warm-up won’t start when Object Cache is acitvated in LiteSpeed Cache plugin.
]]>Hey there, I tried to install this plugin on my local, but facing Fatal errors. The errors are:
PHP Fatal error: Uncaught Exception: Cache Warmer: Unknown option name: -last-handled-version-update in C:\Users\Lenovo\Local Sites\wp-develop\app\public\wp-content\plugins\cache-warmer\src\class-options.php:154
And,
PHP Fatal error: Uncaught Exception: Cache Warmer: Unknown option name: -last-db-success-migration-number in C:\Users\Lenovo\Local Sites\wp-develop\app\public\wp-content\plugins\cache-warmer\src\class-options.php:154
After debugging, I found that, you can trying to get the options of “last-db-success-migration-number” and “last-handled-version-update“, but in your data/options.php, you have defined those as “cache-warmer-last-db-success-migration-number”, and “cache-warmer-last-handled-version-update“. Kindly fix this, either by adding the prefix while calling or removing the prefix while defining.
]]>Hi, I just added the plugin and tried to change some settings as to what I thought would work. I clicked “start a new warm-up”, it then says “warm-up completed”, but no data shows and there is no cache build up that happens across my website. Please help, thanks.
]]>after upgrading to 1.2.1 on the multisite installation I get quite a few of db error deadlocks for the fetch notifications
WordPress database error Deadlock found when trying to get lock; try restarting transaction for query
INSERT INTO wp_actionscheduler_actions ( hook, status, scheduled_date_gmt, scheduled_date_local, schedule, group_id, priority, args )
SELECT 'cache-warmer_fetch_notifications', 'pending', '2024-05-14 12:19:48', '2024-05-14 14:19:48', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0\0scheduled_timestamp\";i:1715689188;s:18:\"\0\0first_timestamp\";i:1715689188;s:13:\"\0*\0recurrence\";i:3600;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1715689188;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:3600;}', 5, 10, '[]' FROM DUAL
WHERE (
SELECT action_id FROM wp_actionscheduler_actions
WHERE status IN ( 'pending', 'in-progress' )
AND hook = 'cache-warmer_fetch_notifications'
AND group_id = 5
LIMIT 1 ) IS NULL made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WP_Plugins_Core\Notifications->schedule_interval, as_schedule_recurring_action, ActionScheduler_ActionFactory->create, ActionScheduler_ActionFactory->store_unique_action, ActionScheduler_DBStore->save_unique_action, ActionScheduler_DBStore->save_action_to_db
Hello,
The plugin runs wel. I can see a log. The pages are visited. I see the loading time before and after the warming but…
When I visit this page which just has been warmed up and should load in 0,3 sec I get a page with is not pre-cached (in the incognito mode with cache disabled). I use LiteSpeed caching.
In my case warming up does not help. Any ideas?
Thanks in advance for your plugin and help!
Looking forward hearing from you.
]]>Hi @tmmtechnology,
would it be possible to keep the crawling of the links to only the set URL? Right know it seems that “external urls” will be also crawled if they are on the site? Or maybe to keep crawling only the whats in the sitemap?
Thank you,
Sissi
]]>I’m getting many warnings on my PHP log like this:
Why is it?
I’ve also noticed that many times the warming process stops working and I should manually stop it and then start it again.
]]>Hi,
Your cache?warming plugin mentions the ability to connect external server crawlers, but I’m not sure what those would be or where to buy?
We shot you an email too, not sure if you saw it.
Hey there!
I am using this amazing plugin on my client’s multisite and on the first site, the sitemap table shows perfectly. But on the second site on the multisite network it doesn’t show anything but it says “Warm up completed” but it doesn’t show the table.
The table I am referring to is: https://prnt.sc/IUuLSDniSrEf
Is there anything I am doing wrong?
]]>