Support » Plugin: Wordfence Security - Firewall, Malware Scan, and Login Security » Warning: We could not remove the caching code from your .htaccess file

  • Hi,

    I wanted to activate the basic cache for a “coming soon” e-commerce website (WP 4.0 with WooCommerce 2.2.4), it’s a semi-dedicated server, but I got this error: “Warning: We could not remove the caching code from your .htaccess file. you need to remove this manually yourself. Wordfence basic caching has been enabled on your system.”

    Now, I don’t understand if the cacheing system is active or not, and what code I should check/remove in the .htaccess (which indeed cannot be modified, cause I locked it strictly).

    TIA

    https://wordpress.org/plugins/wordfence/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Webby )

    Did you go from falcon to basic? When did you lock the htaccess file? I*’m wondering if that just means it can’t wrote to the htaccess and it needs to be manually edited. Our caching additions there are always within an area that says

    The easiest way to see about caching is to check the box on the options page that adds a hidden code below the </html> line to show its being cached. Remember to refresh the browser and possibly even clear your cache locally.

    tim

    Thread Starter webby1973

    (@webby1973)

    Hi Tim,

    I don’t remember to ever had activated Falcon there, because it’s still an under construction website.
    Can you show me what kind of code it’s needed inside the .htaccess file for the basic cacheing? I set the permissions to 444 so I need to manually edit it.
    I already checked the box to add the custom html code, but I don’t see it, and the cache stats are almost empty:
    Total files in cache: 1
    Total directories in cache: 1
    Total data: 8KB
    Largest file: 8KB
    Oldest file in cache created 2 ore ago.
    Newest file in cache created 2 ore ago.

    So I don’t think it’s working.

    Thread Starter webby1973

    (@webby1973)

    I changed the .htaccess permissions to 644, disabled the basic cache, re-enabled it and now there were no alerts, but still it’s not working. The .htaccess file did not change at all, and no html code were added to the pages.

    Hey Webby

    I tested this earlier. On the basic caching nothing is added to htaccess. From the developer:

    Basic caching uses PHP to serve up pages that are stored on disk. So PHP, WordPress and Wordfence execute and interrupt execution to serve up a pre-rendered page early in the execution cycle. This provides a nice speed increase without having to edit your .htaccess. Some sites can’t do this which is why we included the feature.

    Falcon caching adds stuff to the htaccess and I can verify that it does place code at the bottom of the page, but it only did it when my computer’s ip wass reported from an outside ip address (like one that didn’t begin with 10. or 192.168. etc etc)

    Check your ip address and make sure its not reporting as one of those.

    tim

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warning: We could not remove the caching code from your .htaccess file’ is closed to new replies.