Support » Plugin: LiteSpeed Cache » Wordfence Block

  • Resolved davkuk


    good night, I’m having problems with the cache along with the Wordfence plugin, when I block an IP by the plugin’s firewall I need to Purge ALL from the cache manually, but after some time the cache goes back to the previous version and the lock does not work even though it is active.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk


    well , that’s understandable , if a page is cached by unblocked user , it won’t hit PHP again , when no PHP involved , WD won’t run and block request.

    I don’t really have any good solution to this

    alternatively you can use rewrite rule to block an IP


    RewriteCond %{REMOTE_ADDR} ^111\.111\.111\.111$
    RewriteRule .* - [F,L]

    but this seems only to be viable if you need to block handful of IPs, if you need to block a lot or a wide-range , it may not really be an option.

    how does WD works with other cache plugin in such case ?

    Thread Starter davkuk


    I would understand this if the cache was in the browser, but the cache is on the server… so there shouldn’t be this problem since the user would be reconnecting to server and PHP runs again, unless the litespeed cache is different from what I’m imagining.

    now how wordfence works with others, I don’t know, because I only use litespeed cache, I don’t usually use cache from other plugins or programs that can be added to the OS and wordpress.

    Plugin Support qtwrk


    that’s precisely what I want to say , the cache is NOT stored at browser , but on the server , unless you explicitly set cache-control header

    without cache or cache miss :

    user -> webserver -> PHP , after PHP generates the page , the page will be saved into a local file at disk or memory , this step is same for all and any kind of cache plugin

    after cache is generated :

    for example , it saves into /wp-content/cache/page/xxxx.html , and then use rewrite rule or similar technique to redirect the request directly into this HTML file without invoke PHP for max efficiency and speed.

    except the LSWS uses server-built-in feature to redirect into cache , instead of going through rewrite rule , which is little bit of more efficient , but that’s different story , the logic behind all cache plugins is same.

    anyway , at this step , since no PHP will be involved , so WordFence won’t run to check blocking

    that’s what I meant as I don’t have any good solution for this , since PHP is not running at all.

    if WordFence can set a cookie or something , then we can certainly use it to vary , that’s why I wonder how it works with blocking on other cache plugins.

    Thread Starter davkuk


    but what’s the problem, wordfence has its own lock page and it runs before wordpress as I understand it. then there should be this problem on the server.

    after all, the server would get the cache of this wordfence page for the blocked ips. but for some reason it’s not being done in the litespeed cache. in the other caches from what I talked to who uses wordfence is not having this problem.

    Plugin Support qtwrk


    I just tested with

    W3 Total Cache

    WP Fastest Cache

    WP Super Cache

    alone with LiteSpeed Cache , all act same way when page is cached

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.