November 20, 2012 at 10:11 pm #412
I am thinking of installing a cache plug-in like W3 Total Cache. But I already have BulletProof Security Pro installed and activated. Is it as easy as deactivating and installing W3? Then reactivating BPS? W3 Total has so many options and I know it modifies the .htaccess files as well. I just want to make sure I do it right. If you have any instructions or tips that would be great. Or if you think I should use a different plug-in because of better compatibility let me know.
IMPORTANT NOTE: If you have a WordPress Giving Its Own Directory (GWIOD) site then W3TC htaccess caching code goes in the site root htaccess file and not in the BPS root htaccess file or BPS Custom Code. W3TC will automatically create that htaccess code in the site root htaccess file. No further steps are required by you.
Yes, W3 Total Cache writes .htaccess code to your root .htaccess file and also writes a line of code to your wp-config.php file. Since these files are locked with F-Lock you will need to unlock them first to allow W3 Total Cache to write its code to these files. Follow these procedural steps below to install W3 Total Cache on a website with BulletProof Security Pro already installed.
1. Turn off AutoRestore.
2. Go to F-Lock and unlock both your Root .htaccess file and your wp-config.php file.
3. Deactivate W3TC and activate it again.
4. Go to the htaccess File Editor tab page > Your Current Root htaccess File tab > Copy the W3TC .htaccess code from your root htaccess file to this BPS Pro Custom Code text box: CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE.
5. Click the Save Root Custom Code button.
6. Go to F-Lock and select the Lock Root .htaccess file option. Select Checking and Alerts Off option for the wp-config.php file and click the Save Options button.
7. Create an AutoRestore Single File Exclude rule for the advanced-cache.php file (see example shown below). AutoRestore|Quarantine steps for creating wp-content folder and single file exclude rules: http://forum.ait-pro.com/forums/topic/autorestore-quarantine-guide-read-me-first/#autorestore-exclude-rules
Example advanced-cache.php file path:
Note: Use your actual website folder/file path to the advanced-cache.php file when you create your AutoRestore Single File Exclude rule.
8. Re-run the Pre-Installation Wizard and Setup Wizard.December 6, 2012 at 6:59 am #592
Firstly, may I just say what an incredibly thorough and impressive piece of work this Pro plugin is… mind blowing!
Having just purchased the plugin yesterday I have installed it without any glitches at all. I have just followed your W3 TC instructions in this post and all worked perfectly. My question is that I wasn’t sure whether I needed to re-lock the Root .htaccess file and the wp-config.php file after the above process was completed, as it doesn’t instruct to do so? Maybe they need to remain un-locked for the W3 TC to work but I thought I ought to check.
Many thanks for this really impressive piece of work.
JohnDecember 6, 2012 at 7:22 am #593
oops I left that step out. Thank you for letting me know about this. I will add it right now.
These steps are only necessary for this exact scenario where you are installing W3TC for the first time on a website with BPS Pro already installed. If you make any future caching setting changes in W3TC then W3TC will need to be able to write to your root .htaccess again and you can just use the unlock button on the BPS Edit/Upload/Download page to unlock your root .htaccess file. Your root .htaccess file will be sent to Quarantine since the root .htaccess file is being modified outside of the BPS .htaccess editor so you will then just need to use the Restore File option in Quarantine to restore your root .htaccess when it is quarantined. In normal daily website operation if you are not making any changes to W3TC then you will not have to do any additional steps or leave any files unlocked.December 6, 2012 at 7:51 am #597
Perfect! Many thanks for your fast response.January 3, 2014 at 8:52 am #12199
To save your W3TC cache code permanently so that any time in the future that you click the Root folder BulletProof Mode Activate button (copies the master .htaccess file to your website root folder) do these steps below:
1. Copy your W3TC cache code to this BPS Custom Code text box:
IMPORTANT NOTE: The order of custom code in this Custom Code text box is: php/php.ini handler code (if your website uses a php/php.ini handler), W3TC caching code, BPS Speed Boost Cache code (if you choose to use this additional Bonus Code).
2. Click the Save Root Custom Code button.
3. Go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.January 16, 2014 at 9:51 am #12428
I got that problem too, after some update i got the message that the website is not protected and i should create a new master .htaccess.
I did that and then got the message :
W3 Total Cache is activated, but W3TC htaccess code was NOT found in your root htaccess file. W3TC needs to be redeployed by clicking either the W3TC… I tried strep by step how you describe here, but it is still there. How is that possible? Where do i find the “W3TC caching code” which i can copy in the BPS Custom Code text box?
Kind RegardsJanuary 16, 2014 at 12:03 pm #12429
Many things have changed with W3TC so maybe you are not actually using or have any W3TC .htaccess code. To make the error check go away do these steps.
1. Copy this text: # W3TC Error Check to this BPS Custom Code text box:
2. Click the Save Root Custom Code button.
3. Go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.
4. Refresh your Browser and the Error Check should go away.January 17, 2014 at 2:03 am #12434
Perfect that worked!October 19, 2014 at 12:57 pm #18506
Just need an idiots guide for this please, as I’ve tried following the above steps but then panicked and uninstalled the W3 TC again and don’t know what to do with the quarantined files!
So I have BPS Pro, and would now like to do a new install of W3 TC. I followed the steps at the start of this thread from 1 – 6 but didn’t know at what stage to do the exclude rules for the files below – could I do them as step #1 to ensure they are effective??:
/home/xxxxx/public_html/xxxxx/wp-content/object-cache.php /home/xxxxx/public_html/xxxxx/wp-content/advanced-cache.php /home/xxxxx/public_html/xxxxx/wp-content/db.php
So now in my quarantined files it includes these files (each twice over), and as I’ve uninstalled the W3 Tc plugin I guess I should just delete them?:
/wp-config.php /wp-content/advanced-cache.php /wp-content/w3tc-config/index.html /wp-content/w3tc-config/master.php /wp-content/w3tc-config/master-admin.php
Could you list the steps exactly in order for the start to the end of setup for this install please as I’m really stuck now?
Also I just remembered that what really floored me, was when looked for the W3 TC plugin .htaccess code in my Current Root .htaccess file it wasn’t there – so not sure what had happened, but it didn’t seem right – hence my uninstalling it eventually.October 19, 2014 at 1:18 pm #18515
I just noticed that the link at the beginning of this Forum Topic had the wrong link for the AutoRestore/Quarantine Exclude Folders & Files video tutorial. That link has been added above and I’ll post it again here: http://forum.ait-pro.com/video-tutorials/#autorestore-quarantine
1. Turn Off AutoRestore first while setting up W3TC.
2. Do the W3TC setup steps above to add the W3TC htaccess cache code to BPS Custom Code, activate Root folder BulletProof Mode and check that W3TC is working correctly.
3. If everything is working correctly – run the Pre-Installation Wizard and Setup Wizard again.
At a later time if you change your W3TC settings again then a couple of the W3TC files will be quarantined. Watch the AutoRestore/Quarantine Exclude Folders & Files video tutorial above for the steps to exclude W3TC files from being quarantined in the future.October 19, 2014 at 11:14 pm #18519
OK, well this has been a bit of a ‘journey’! Nothing seemed to go as you said above – not even the W3 TC htaccess code for copying etc. And it kept saying that it (W3 TC) couldn’t access my .htaccess file or wp-contents file, even though I’d unlocked them in the F-lock section…. until i realised that I’d tightened up the file permissions as much as possible when I’d first installed the free version a few months ago, so both the wp-content and the wp-content/uploads were at 705 and 755 respectively. Once I’d changed these both to 777 and tried to reload it seemed to be happier, plus then I think I found the correct W3 TC htaccess code in another place (but not in the root access file) and copied it in to the BPS custom code, plus added all the file exclusions in the ARQ section as above etc.
So the long and the short of it is that it now seems to be all working, but there were 2 extra files that were quarantined, which BPS wouldn’t save as an excluded file – it would ONLY save it as an excluded folder. The files were:
So I’ve saved the excluded folder as:
Is this right?
Also once finished, is the correct procedure: 1.full bulletproof procedure 2. F-lock to lock the root htaccess and wp-config.php again 3. Pre-Installation Wizard and Setup Wizard again?
I’m afraid all is not well still – despite it seeming Ok, when I go to the W3 TC dashboard, I get this warning:
FTP credentials don’t allow to write to file /home/xxx/public_html/mysite.com/.htaccess
W3 Total Cache Error: Files and directories could not be automatically created to complete the installation. View required Changes.
And then I add in the replacement code to my BPS custom code in the top code block, save it, redo the magic bullet proof mode etc… But when i go back to the W3 dashboard again it keeps showing me different required code for the htaccess! So I now have got no idea what to do, as I’m just going around in circles! Should I completely uninstall and start from scratch, or am I missing something obvious?
many thanks 🙂October 20, 2014 at 7:21 am #18528
I’m worried about this – “Once I’d changed these both to 777”. You should never have to use 777 permissions so change that back immediately. 777 permissions allow anyone to write to a folder or file. Create a temporary Administrator login to this website and send it to edward at ait-pro dot com and I will setup W3TC on this site and let you know, which step needed to be done.October 20, 2014 at 11:52 am #18544
The reason I changed the file permissions is because that’s what the W3 TC installation instructions said they had to be (see https://wordpress.org/plugins/w3-total-cache/installation/) and although that wasn’t in you instructions, and by unlocking with F-lock didn’t do it, i assumed that was one of the reasons it wasn’t installing correctly. But I’ve changed them all back again (via cPanel) as soon as I’d finished the W3 TC installation.
I really appreciate your offer to look at it/install it (W3TC) for me, but I’d quite like to have another go at it, with your step by step instructions if possible, as I have another (more important) site to install it on too, so want to get it right on this one first! But if you think it will take too long to explain that’s fine and I’ll email you a login? Thanks.October 20, 2014 at 12:09 pm #18546
The step by step instructions are already posted above so I am not sure what else you want me to post here? I believe where the problem is occurring is when you are copying and pasting W3TC htaccess code to BPS Custom code. At least that is where most people get a little lost. Make sure your root .htaccess is unlocked and then deactivate and activate W3TC and resave your W3TC plugin settings. What will happen is that W3TC will be able to write its htaccess code into the root .htaccess file. Copy that W3TC htaccess code to the CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE text box and do the rest of the steps.October 20, 2014 at 12:40 pm #18552
Ok, I’m all clear on that. Do you think I should still need to change my file permissions to 777 (in cPanel) for the folders W3TC mention or just use the unlock in F-lock section?
You must be logged in to reply to this topic.