Not updating the site after changes in the database
-
Hello Dears
When I make changes to the post and edit the post date both through the database, but it is still the same as the previous cache on the site (Of course, this is only for site users. If I am logged in to WordPress, the site cache is new to me)
But when I click the quick edit button and save the button without any changes, the site cache becomes new.
How can I fix this? So that by changing the post through the database, the site cache will also be updated for all users of website.
-
Now I used this code:
<?php define( 'WP_USE_THEMES', false ); require( './wp-load.php' ); if ( defined( 'LSCWP_V' ) ) { do_action( 'litespeed_purge_all' ); echo "done"; } ?>
Is like before; After the run a
Purged all caches successfully.
message appears in wordpress admin panel, But the cache is not cleared- This reply was modified 3 years, 7 months ago by Rezar.
What exactly was the way you used to access thud file? Command line? Browser?
Hi,
We tried both of these methods
04/21/21 00:07:13.522 [45.46.16.106:34433 1 b9S] [Ctrl] 301 from https://my_site.com/wp-admin/admin.php 04/21/21 00:07:13.522 [45.46.16.106:34433 1 b9S] [Ctrl] 301 to https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox 04/21/21 00:07:13.523 [45.46.16.106:34433 1 b9S] [Ctrl] X Cache_control -> no Cache ( 301 to same url ) => LiteSpeed\Control::set_nocache(( 301 to same url ))@362 => LiteSpeed\Control->check_redirect(https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox,302)@508 => WP_Hook->apply_filters(https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox,ARRAY)@292 04/21/21 00:07:13.524 [45.46.16.106:34433 1 b9S] [Core] CHK html bypass: miss footer const 04/21/21 00:07:13.524 [45.46.16.106:34433 1 b9S] [Ctrl] not cacheable before ctrl finalize 04/21/21 00:07:13.524 [45.46.16.106:34433 1 b9S] [Router] get_role: administrator 04/21/21 00:07:13.525 [45.46.16.106:34433 1 b9S] [Vary] role in vary_group [group] 99 04/21/21 00:07:13.525 [45.46.16.106:34433 1 b9S] [Vary] show_admin_bar_front: true 04/21/21 00:07:13.525 [45.46.16.106:34433 1 b9S] [Vary] admin bar : true 04/21/21 00:07:13.525 [45.46.16.106:34433 1 b9S] [Vary] no custimzed vary 04/21/21 00:07:13.526 [45.46.16.106:34433 1 b9S] ?? X-LiteSpeed-Cache-Control: no-cache 04/21/21 00:07:13.526 [45.46.16.106:34433 1 b9S] [Core] CHK html bypass: miss footer const 04/21/21 00:07:13.526 [45.46.16.106:34433 1 b9S] [Media] bypass: Not frontend HTML type 04/21/21 00:07:13.527 [45.46.16.106:34433 1 b9S] GUI bypassed by no counter 04/21/21 00:07:13.527 [45.46.16.106:34433 1 b9S] [Optm] bypass: Not frontend HTML type 04/21/21 00:07:13.527 [45.46.16.106:34433 1 b9S] CDN bypass 04/21/21 00:07:13.527 [45.46.16.106:34433 1 b9S] End response -------------------------------------------------------------------------------- 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] ?? ------GET HTTP/1.1 (HTTPS) /wp-admin/admin.php 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] Query String: page=litespeed-toolbox 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] HTTP_REFERER: https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] Accept Encoding: gzip, deflate, br 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] Cookie _lscache_vary: admin_bar:1;logged-in:1;role:99 04/20/21 19:37:14.102 [45.46.16.106:34433 1 gox] X-LSCACHE: true 04/21/21 00:07:14.207 [45.46.16.106:34433 1 gox] [Ctrl] X Cache_control -> stale 04/21/21 00:07:14.208 [45.46.16.106:34433 1 gox] [Ctrl] X Cache_control -> private ( logged in user ) 04/21/21 00:07:14.308 [45.46.16.106:34433 1 gox] [Media] init 04/21/21 00:07:14.309 [45.46.16.106:34433 1 gox] [LQIP] init 04/21/21 00:07:14.310 [45.46.16.106:34433 1 gox] [CDN] init 04/21/21 00:07:14.311 [45.46.16.106:34433 1 gox] [Router] CDN bypassed: is not ajax call 04/21/21 00:07:14.311 [45.46.16.106:34433 1 gox] [Router] CDN bypassed: ajax call from admin 04/21/21 00:07:14.312 [45.46.16.106:34433 1 gox] ? Task init 04/21/21 00:07:14.312 [45.46.16.106:34433 1 gox] [Router] LSCWP_CTRL bypassed empty 04/21/21 00:07:14.360 [45.46.16.106:34433 1 gox] [Ctrl] X Cache_control -> no Cache ( Admin page ) => LiteSpeed\Control::set_nocache(( Admin page ))@362 => LiteSpeed\Admin->admin_init()@72 => WP_Hook->apply_filters(ARRAY)@292 04/21/21 00:07:14.425 [45.46.16.106:34433 1 gox] [Core] CHK html bypass: miss footer const 04/21/21 00:07:14.426 [45.46.16.106:34433 1 gox] [Ctrl] not cacheable before ctrl finalize 04/21/21 00:07:14.426 [45.46.16.106:34433 1 gox] [Router] get_role: administrator 04/21/21 00:07:14.426 [45.46.16.106:34433 1 gox] [Vary] role in vary_group [group] 99 04/21/21 00:07:14.427 [45.46.16.106:34433 1 gox] [Vary] show_admin_bar_front: true 04/21/21 00:07:14.427 [45.46.16.106:34433 1 gox] [Vary] admin bar : true 04/21/21 00:07:14.428 [45.46.16.106:34433 1 gox] [Vary] no custimzed vary 04/21/21 00:07:14.428 [45.46.16.106:34433 1 gox] ?? X-LiteSpeed-Cache-Control: no-cache 04/21/21 00:07:14.429 [45.46.16.106:34433 1 gox] [Core] CHK html bypass: miss footer const 04/21/21 00:07:14.429 [45.46.16.106:34433 1 gox] [Media] bypass: Not frontend HTML type 04/21/21 00:07:14.429 [45.46.16.106:34433 1 gox] GUI bypassed by no counter 04/21/21 00:07:14.430 [45.46.16.106:34433 1 gox] [Optm] bypass: Not frontend HTML type 04/21/21 00:07:14.430 [45.46.16.106:34433 1 gox] CDN bypass 04/21/21 00:07:14.430 [45.46.16.106:34433 1 gox] End response --------------------------------------------------------------------------------
In the above code, I just replaced my site domain name and IP
Hi,
no , the log is incorrect, it shows logs on /wp-admin/admin.php , not the purge script
Best regards,
Response Headers
alt-svc: quic=":443"; ma=2592000; v="43,46", h3-Q043=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-25=":443"; ma=2592000, h3-27=":443"; ma=2592000 cache-control: public, max-age=60 content-encoding: br content-length: 11 content-type: text/html; charset=UTF-8 date: Tue, 20 Apr 2021 15:19:43 GMT expires: Tue, 20 Apr 2021 15:20:43 GMT server: LiteSpeed vary: Accept-Encoding,User-Agent
Do you mean this?
no
enable the debug log , then access the purge script , let’s you purge script named like
purge.php
then you should see something like
------GET HTTP/1.1 (HTTPS) /purge.php
in log , this block is the correct one
and also ,
cache-control: public, max-age=60
get rid of this , it will instruct browser to cache page , you don’t want this to happen on dynamic pageAfter doing this, I will get the
?? ------GET HTTP/1.1 (HTTPS) /purge.php
at the /wp-admin/admin.php
But still the cache is not cleared- This reply was modified 3 years, 7 months ago by Rezar.
Yes, but please show me the log
And also the report number, you can get it in toolbox, report, click send to LiteSpeed
All the log (I just replaced my real site domain name and IP):
04/21/21 16:17:04.212 [45.46.16.106:61537 1 IJx] [Ctrl] 301 from https://my_site.com/wp-admin/admin.php 04/21/21 16:17:04.213 [45.46.16.106:61537 1 IJx] [Ctrl] 301 to https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox 04/21/21 16:17:04.213 [45.46.16.106:61537 1 IJx] [Ctrl] X Cache_control -> no Cache ( 301 to same url ) => LiteSpeed\Control::set_nocache(( 301 to same url ))@362 => LiteSpeed\Control->check_redirect(https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox,302)@508 => WP_Hook->apply_filters(https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox,ARRAY)@292 04/21/21 16:17:04.214 [45.46.16.106:61537 1 IJx] [Core] CHK html bypass: miss footer const 04/21/21 16:17:04.214 [45.46.16.106:61537 1 IJx] [Ctrl] not cacheable before ctrl finalize 04/21/21 16:17:04.215 [45.46.16.106:61537 1 IJx] [Router] get_role: administrator 04/21/21 16:17:04.215 [45.46.16.106:61537 1 IJx] [Vary] role in vary_group [group] 99 04/21/21 16:17:04.216 [45.46.16.106:61537 1 IJx] [Vary] show_admin_bar_front: true 04/21/21 16:17:04.216 [45.46.16.106:61537 1 IJx] [Vary] admin bar : true 04/21/21 16:17:04.216 [45.46.16.106:61537 1 IJx] [Vary] no custimzed vary 04/21/21 16:17:04.217 [45.46.16.106:61537 1 IJx] ?? X-LiteSpeed-Cache-Control: no-cache 04/21/21 16:17:04.217 [45.46.16.106:61537 1 IJx] [Core] CHK html bypass: miss footer const 04/21/21 16:17:04.218 [45.46.16.106:61537 1 IJx] [Media] bypass: Not frontend HTML type 04/21/21 16:17:04.218 [45.46.16.106:61537 1 IJx] GUI bypassed by no counter 04/21/21 16:17:04.219 [45.46.16.106:61537 1 IJx] [Optm] bypass: Not frontend HTML type 04/21/21 16:17:04.219 [45.46.16.106:61537 1 IJx] CDN bypass 04/21/21 16:17:04.219 [45.46.16.106:61537 1 IJx] End response -------------------------------------------------------------------------------- 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] ?? ------GET HTTP/1.1 (HTTPS) /wp-admin/admin.php 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] Query String: page=litespeed-toolbox 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] HTTP_REFERER: https://my_site.com/wp-admin/admin.php?page=litespeed-toolbox 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] Accept Encoding: gzip, deflate, br 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] Cookie _lscache_vary: admin_bar:1;logged-in:1;role:99 04/21/21 11:47:04.336 [45.46.16.106:61537 1 3J3] X-LSCACHE: true 04/21/21 16:17:04.424 [45.46.16.106:61537 1 3J3] [Ctrl] X Cache_control -> stale 04/21/21 16:17:04.425 [45.46.16.106:61537 1 3J3] [Ctrl] X Cache_control -> private ( logged in user ) 04/21/21 16:17:04.501 [45.46.16.106:61537 1 3J3] [Media] init 04/21/21 16:17:04.502 [45.46.16.106:61537 1 3J3] [LQIP] init 04/21/21 16:17:04.503 [45.46.16.106:61537 1 3J3] [CDN] init 04/21/21 16:17:04.503 [45.46.16.106:61537 1 3J3] [Router] CDN bypassed: is not ajax call 04/21/21 16:17:04.503 [45.46.16.106:61537 1 3J3] [Router] CDN bypassed: ajax call from admin 04/21/21 16:17:04.504 [45.46.16.106:61537 1 3J3] ? Task init 04/21/21 16:17:04.504 [45.46.16.106:61537 1 3J3] [Router] LSCWP_CTRL bypassed empty 04/21/21 16:17:04.538 [45.46.16.106:61537 1 3J3] [Ctrl] X Cache_control -> no Cache ( Admin page ) => LiteSpeed\Control::set_nocache(( Admin page ))@362 => LiteSpeed\Admin->admin_init()@72 => WP_Hook->apply_filters(ARRAY)@292 04/21/21 16:17:04.618 [45.46.16.106:61537 1 3J3] [Core] CHK html bypass: miss footer const 04/21/21 16:17:04.618 [45.46.16.106:61537 1 3J3] [Ctrl] not cacheable before ctrl finalize 04/21/21 16:17:04.619 [45.46.16.106:61537 1 3J3] [Router] get_role: administrator 04/21/21 16:17:04.619 [45.46.16.106:61537 1 3J3] [Vary] role in vary_group [group] 99 04/21/21 16:17:04.619 [45.46.16.106:61537 1 3J3] [Vary] show_admin_bar_front: true 04/21/21 16:17:04.620 [45.46.16.106:61537 1 3J3] [Vary] admin bar : true 04/21/21 16:17:04.620 [45.46.16.106:61537 1 3J3] [Vary] no custimzed vary 04/21/21 16:17:04.621 [45.46.16.106:61537 1 3J3] ?? X-LiteSpeed-Cache-Control: no-cache 04/21/21 16:17:04.621 [45.46.16.106:61537 1 3J3] [Core] CHK html bypass: miss footer const 04/21/21 16:17:04.622 [45.46.16.106:61537 1 3J3] [Media] bypass: Not frontend HTML type 04/21/21 16:17:04.622 [45.46.16.106:61537 1 3J3] GUI bypassed by no counter 04/21/21 16:17:04.622 [45.46.16.106:61537 1 3J3] [Optm] bypass: Not frontend HTML type 04/21/21 16:17:04.623 [45.46.16.106:61537 1 3J3] CDN bypass 04/21/21 16:17:04.623 [45.46.16.106:61537 1 3J3] End response -------------------------------------------------------------------------------- 04/21/21 11:47:12.439 [45.46.16.106:61561 1 l3G] ?? ------GET HTTP/1.1 (HTTPS) /purge2.php 04/21/21 11:47:12.440 [45.46.16.106:61561 1 l3G] Query String: 04/21/21 11:47:12.440 [45.46.16.106:61561 1 l3G] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0 04/21/21 11:47:12.440 [45.46.16.106:61561 1 l3G] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 04/21/21 11:47:12.440 [45.46.16.106:61561 1 l3G] Accept Encoding: gzip, deflate, br 04/21/21 11:47:12.440 [45.46.16.106:61561 1 l3G] X-LSCACHE: true 04/21/21 16:17:12.493 [45.46.16.106:61561 1 l3G] [Ctrl] X Cache_control -> stale 04/21/21 16:17:12.587 [45.46.16.106:61561 1 l3G] [Router] get_role: 04/21/21 16:17:12.588 [45.46.16.106:61561 1 l3G] [Media] init 04/21/21 16:17:12.590 [45.46.16.106:61561 1 l3G] [LQIP] init 04/21/21 16:17:12.591 [45.46.16.106:61561 1 l3G] [CDN] init 04/21/21 16:17:12.592 [45.46.16.106:61561 1 l3G] ? Task init 04/21/21 16:17:12.592 [45.46.16.106:61561 1 l3G] [Router] LSCWP_CTRL bypassed empty 04/21/21 16:17:12.593 [45.46.16.106:61561 1 l3G] [GUI] init 04/21/21 16:17:12.601 [45.46.16.106:61561 1 l3G] [Purge] added * => LiteSpeed\Purge->_add(ARRAY)@403 => LiteSpeed\Purge->_purge_all_lscache()@209 => LiteSpeed\Purge->_purge_all()@175 => LiteSpeed\Purge::purge_all()@165 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 => /home/androidg/public_html/purge2.php@484 04/21/21 16:17:12.601 [45.46.16.106:61561 1 l3G] X-LiteSpeed-Purge: public,stale,92e_ 04/21/21 16:17:12.605 [45.46.16.106:61561 1 l3G] [Purge] added MIN => LiteSpeed\Purge->_add(ARRAY)@403 => LiteSpeed\Purge->_purge_all_cssjs()@296 => LiteSpeed\Purge->_purge_all()@176 => LiteSpeed\Purge::purge_all()@165 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 => /home/androidg/public_html/purge2.php@484 04/21/21 16:17:12.606 [45.46.16.106:61561 1 l3G] X-LiteSpeed-Purge: public,stale,92e_ 04/21/21 16:17:12.608 [45.46.16.106:61561 1 l3G] [Purge] added LOCALRES => LiteSpeed\Purge->_add(ARRAY)@403 => LiteSpeed\Purge->_purge_all_localres()@277 => LiteSpeed\Purge->_purge_all()@177 => LiteSpeed\Purge::purge_all()@165 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 => /home/androidg/public_html/purge2.php@484 04/21/21 16:17:12.609 [45.46.16.106:61561 1 l3G] X-LiteSpeed-Purge: public,stale,92e_ 04/21/21 16:17:12.609 [45.46.16.106:61561 1 l3G] [Purge] Failed to flush object cache due to object cache not enabled 04/21/21 16:17:12.610 [45.46.16.106:61561 1 l3G] [Purge] Reset opcode cache 04/21/21 16:17:12.610 [45.46.16.106:61561 1 l3G] [Purge] Purge all => LiteSpeed\Purge->_purge_all()@191 => LiteSpeed\Purge::purge_all()@165 => WP_Hook->apply_filters(,ARRAY)@292 => WP_Hook->do_action(ARRAY)@316 04/21/21 16:17:12.613 [45.46.16.106:61561 1 l3G] [Core] CHK html bypass: miss footer const 04/21/21 16:17:12.613 [45.46.16.106:61561 1 l3G] [Ctrl] not cacheable before ctrl finalize 04/21/21 16:17:12.614 [45.46.16.106:61561 1 l3G] [Router] get_role: 04/21/21 16:17:12.614 [45.46.16.106:61561 1 l3G] [Vary] role id: failed, guest 04/21/21 16:17:12.614 [45.46.16.106:61561 1 l3G] [Router] get_role: 04/21/21 16:17:12.615 [45.46.16.106:61561 1 l3G] [Router] get_role: 04/21/21 16:17:12.615 [45.46.16.106:61561 1 l3G] [Vary] no custimzed vary 04/21/21 16:17:12.616 [45.46.16.106:61561 1 l3G] ?? X-LiteSpeed-Cache-Control: no-cache 04/21/21 16:17:12.618 [45.46.16.106:61561 1 l3G] ?? X-LiteSpeed-Purge: public,stale,92e_ 04/21/21 16:17:12.619 [45.46.16.106:61561 1 l3G] [Core] CHK html bypass: miss footer const 04/21/21 16:17:12.619 [45.46.16.106:61561 1 l3G] [Media] bypass: Not frontend HTML type 04/21/21 16:17:12.619 [45.46.16.106:61561 1 l3G] GUI bypassed by no counter 04/21/21 16:17:12.620 [45.46.16.106:61561 1 l3G] [Optm] bypass: Not frontend HTML type 04/21/21 16:17:12.620 [45.46.16.106:61561 1 l3G] CDN bypass 04/21/21 16:17:12.620 [45.46.16.106:61561 1 l3G] End response -------------------------------------------------------------------------------- 04/21/21 11:47:16.564 [45.46.16.106:61537 1 emZ] ?? ------GET HTTP/1.1 (HTTPS) /wp-admin/admin.php 04/21/21 11:47:16.564 [45.46.16.106:61537 1 emZ] Query String: page=litespeed-toolbox 04/21/21 11:47:16.564 [45.46.16.106:61537 1 emZ] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0 04/21/21 11:47:16.564 [45.46.16.106:61537 1 emZ] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 04/21/21 11:47:16.564 [45.46.16.106:61537 1 emZ] Accept Encoding: gzip, deflate, br 04/21/21 11:47:16.564 [45.46.16.106:61537 1 emZ] Cookie _lscache_vary: admin_bar:1;logged-in:1;role:99 04/21/21 11:47:16.564 [45.46.16.106:61537 1 emZ] X-LSCACHE: true 04/21/21 16:17:16.782 [45.46.16.106:61537 1 emZ] [Ctrl] X Cache_control -> stale 04/21/21 16:17:16.783 [45.46.16.106:61537 1 emZ] [Ctrl] X Cache_control -> private ( logged in user ) 04/21/21 16:17:16.906 [45.46.16.106:61537 1 emZ] [Media] init 04/21/21 16:17:16.907 [45.46.16.106:61537 1 emZ] [LQIP] init 04/21/21 16:17:16.908 [45.46.16.106:61537 1 emZ] [CDN] init 04/21/21 16:17:16.908 [45.46.16.106:61537 1 emZ] [Router] CDN bypassed: is not ajax call 04/21/21 16:17:16.909 [45.46.16.106:61537 1 emZ] ? Task init 04/21/21 16:17:16.909 [45.46.16.106:61537 1 emZ] [Router] LSCWP_CTRL bypassed empty 04/21/21 16:17:16.946 [45.46.16.106:61537 1 emZ] [Ctrl] X Cache_control -> no Cache ( Admin page ) => LiteSpeed\Control::set_nocache(( Admin page ))@362 => LiteSpeed\Admin->admin_init()@72 => WP_Hook->apply_filters(ARRAY)@292
And report info:
Report number: BJQQIIEH
Report date: 04/21/2021 11:51:27
Hi,
you have a
Cache-control: public, max-age=60
on your dynamic pagesthis will instruct browser to cache the page , so even server-side has purged and generated new page, browser will still load old pages
please get rid of this header first
best regards,
Hi dear,
This is not a problem. I always try with a private window And there is no cache
Everything is fine by click on the Purge all button in wordpress panel
But we do not get this result by executing the php codeTry this one
<?php
header(‘x-litespeed-purge:*’);Then access it, and check the litespeed cache header on your page before and after
Hi,
I’m going to mark this topic “Resolved”, due to lack of activity.
If you still need help, please feel free to re-open it.
When re-open it, please also change the topic status to “not solved”
Best regards,
- The topic ‘Not updating the site after changes in the database’ is closed to new replies.