WordPress.org

Ready to get started?Download WordPress

Forums

BulletProof Security
[resolved] BPS and WP Super Cache (12 posts)

  1. Jay Collier
    Member
    Posted 2 years ago #

    Even after following instructions for cleaning up the root .htaccess file, I am still getting this warning:

    WP Super Cache is deactivated and WPSC .htaccess code - # BEGIN WPSuperCache # END WPSuperCache - was found in your root .htaccess file.

    Plus quite a bit more language.

    WP-SuperCache is network activated subdirectories, but BPS is installed, but can only be activated on blog 1.

    Any suggestions or pointers to where this may have already been discussed?

    TIA.

    http://wordpress.org/extend/plugins/bulletproof-security/

  2. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    For Network / MU sites:
    BPS should NOT be Network activated.
    BulletProof Modes should ONLY be activated on the Primary site.

    The entire checking / warning / error message is:
    WP Super Cache is deactivated and WPSC .htaccess code - # BEGIN WPSuperCache # END WPSuperCache - was found in your root .htaccess file. If this is just temporary then this warning message will go away when you reactivate WPSC. You will need to set up and reconfigure WPSC again when you reactivate WPSC. Your Root .htaccess file must be temporarily unlocked if you are planning on uninstalling WPSC. The WPSC .htaccess code will be automatically removed from your root .htaccess file when you uninstall WPSC. If you added a commented out line of code in anywhere in your root htaccess file - # WPSuperCache - then delete it and refresh your browser.

    Are any of these conditions true above in the checking / warning / error message? If so, have you followed the instructions in the checking / warning / error message if it applies to your particular scenario?
    Thanks.

  3. Jay Collier
    Member
    Posted 2 years ago #

    Thank you so much for that clarification. I missed that distinction when I was reading the warning and the manual.

    So, I changed BPS to be only active on the main site ... and I'm still getting the warning.

    WP Super Cache is deactivated and WPSC .htaccess code - # BEGIN WPSuperCache # END WPSuperCache - was found in your root .htaccess file.

    And WPSC actually is activated and working. However, might the fact that WPSC is network activated (and not on that main site) be an issue?

  4. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    If WPSC is activated and if you are not using WPSC mod_rewrite then just add this commented out line of code in anywhere in your root htaccess file - # WPSuperCache.

    If you are using WPSC mod_rewrite and WPSC .htaccess code does not really exist in your Root .htaccess file then unlock your Root .htaccess file and go to the WPSC Settings page and click the Update Mod_Rewrite Rules button.

    BPS is checking if WPSC is seen as activated and if the WPSC .htaccess code exists in your Root .htaccess file.

  5. Jay Collier
    Member
    Posted 2 years ago #

    I am using WPSC, and I am using it via mod_rewrite rules (all generated by WPSC), and WPSC is, indeed, network activated.

    Hmmm.

  6. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    So have you looked at your Root .htaccess file yet with the BPS .htaccess File Editor to see if the WPSC .htaccess code is really there? If your Root .htaccess file is locked then it will block WPSC from being able to actually write the WPSC .htaccess code to your Root .htaccess file. You need to unlock your Root .htaccess file in order to allow WPSC to write to it.

  7. Jay Collier
    Member
    Posted 2 years ago #

    Actually, I am looking at my root .htaccess file right now, and it starts with this ...

    Options +FollowSymlinks
    Options -Indexes
    
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    ... has about 60 lines for WPSC, followed by ...

    # END WPSuperCache
    # BEGIN WordPress

    ... etc. It's right there, so that's why I'm confused.

    Strange?

  8. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    I just tried to test WPSC on a local XAMPP installation of MU and i could not get it to work quite correctly - WPSC would not write to the root .htaccess file when Network Activated so i manually copied the .htaccess code to the Root .htaccess file and I am now seeing that error. Will let you know why this is in a bit.

  9. Jay Collier
    Member
    Posted 2 years ago #

    I am also using LAMP (rather MAMP) for testing, but WPSC works just fine after changing the machine path.

    I'll comment out the warning and keep testing. Thanks for checking into it for me. You are responsive, and that is appreciated.

  10. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    Yep i am seeing the error and am looking into why it is occurring. Will post back when i find out why that is. The obvious thing is that by Network Activating WPSC, WPSC is not shown in the Plugins page for the Primary site. I was under the assumption that the coding check looked at both single and Network activated plugins, but it appears that another condition needs to be added to the coding check for MU.

    Yep looks like a check for this condition needs to be added to BPS for MU.
    is_plugin_active_for_network

  11. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    For now to get rid of this incorrect error message do this below. I will add this additional condition check in BPS .47.

    Look for this function in /bulletproof-security/includes/functions.php

    function bps_wpsc_htaccess_check($plugin_var) {
    ...
    ...
    ...
    comment out this line of code
    // if ($return_var == 1) { // return $return_var; ---- 1 equals active
    
    comment out the end brace that goes with this "if" condition
    // }
    
    change this line of code in the function
    
    from...
    
    elseif ($return_var != 1) {
    
    to...
    
    if ($return_var == 1) {
  12. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    Wow this one was really simple. DOH! Went too deep on the suggested temporary fix above.

    All you need to do is this coding modification below. This will be included BPS .47, which will be released in a few days. This has been tested and is working fine for all conditions on Standard WP Single sites and Network sites.

    Look for this function in /bulletproof-security/includes/functions.php

    function bps_wpsc_htaccess_check($plugin_var) {
    ...
    ...
    ...
    
    change this code...
    if ($return_var == 1) {
    
    ...to this...
    if ($return_var == 1 || is_plugin_active_for_network( 'wp-super-cache/wp-cache.php' )) {
    
    ...and also change this code...
    elseif ($return_var != 1) {
    
    ...to this...
    elseif ($return_var != 1 || !is_plugin_active_for_network( 'wp-super-cache/wp-cache.php' )) {

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic