Plugin Author
AITpro
(@aitpro)
Hmm interesting. Can you dismiss that error messag in W3TC? BPS uses the standard WordPress htaccess code in BPS standard htaccess code. Or in other words, the W3TC error message and check is not valid so you can ignore it. I will install W3TC and test it later today to find out more about this.
Thread Starter
Max
(@fltxprt)
Thanks for your very quick reply. Yes, there is an option to just hide the message. W3 Total Cache does appear to be working correctly for me following the BPS Security update.
Plugin Author
AITpro
(@aitpro)
Yep, what i assume is happening is that W3TC is looking for the standard BEGIN WordPress and END WordPress markers/placeholders/text in the root htaccess file and we have removed those markers since they cause a pretty major problem when the WordPress flush_rewrite_rules function is executed by other plugins and themes so those markers needed to be removed. I think it might be possible to add those markers/placeholders at the bottom of the root htaccess file in BPS Custom Code without causing the original problem again with the WP flush_rewrite_rules function, but i would need to test that theory to see if it is ok to do. Will test that a little later on today.
Plugin Author
AITpro
(@aitpro)
Ok I have tested W3TC and here is what works to trick W3TC into thinking the WordPress standard code exists, which it actually really does, but without the marker/placeholder text: BEGIN WordPress and END WordPress.
VERY IMPORTANT!: ONLY add the # BEGIN WordPress marker/placeholder text in this BPS Custom Code text box: CUSTOM CODE BOTTOM HOTLINKING/FORBID COMMENT SPAMMERS/BLOCK BOTS/BLOCK IP/REDIRECT CODE: Add miscellaneous code here . And that text should go AFTER all of your other custom code if you have added any custom code in that Custom Code text box.
Click the Save Root Custom Code button.
Go to the Security Modes page, click the Create secure.htaccess File AutoMagic button and activate Root folder BulletProof Mode.
DO NOT add the “# END WordPress” marker/placeholder text. The worst thing that will happen is that since BPS now automatically checks for and corrects several potential problems that have to do with both of these markers/placeholders then BPS will strip out BEGIN WordPress and END WordPress from the root htaccess file, which just takes you back to square one.
By only using just the “# BEGIN WordPress” marker/placeholder text – W3TC will not generate an error message and BPS will not strip out the “# BEGIN WordPress” marker/placeholder text.
Plugin Author
AITpro
(@aitpro)
Forgot to mention this. If another plugin or theme does execute the flush_rewrite_rules function and your root htaccess file is not locked then the standard WP code will be written where the marker/placeholder text is at the bottom of your root htaccess file and then BPS will automatically remove all of that code including the # BEGIN WordPress marker/placeholder text since that code would cause catastrophic website problems for your website. 😉
Thanks for the update about the W3TC error message.
One thing though: does it matter? I can just hide the W3TC error message and the site seems to work properly, so do I need to follow your solution above to make sure that BPS and W3TC play nicely together or is this just a cosmetic fix for the W3TC error message?
Top plugin – many thanks for all your work on it.
Cheers
DBR
Plugin Author
AITpro
(@aitpro)
Nope you don’t need to add that “trick” text to Custom Code and can just use the W3TC “hide” dismiss link for the error message. Since someone else is going to ask this same question at some point I can just send them to this thread. 😉 I have found that it is better to fully explain the cause and solution and give folks as many options as possible.
Very welcome.
Ta v. much for explaining it fully. I agree, more information is always better!
Top support as well 😀