WP Rocket caused a 500 error

Home Forums BulletProof Security Pro WP Rocket caused a 500 error

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #36669
    webstar
    Participant

    I installed WP Rocket and after activating it, it caused a 500 error.
    I couldn’t get into my site via the xternal file, so I renamed the BPS directory.
    Still couldn’t get in.
    Then I replaced my .htaccess file with the auto_htaccess file because I noticed the htaccess file had a bunch of WP Rocket modifications.
    Then I could get in.
    I deactivated the WP Rocket plugin and ran the pre-installation.
    Results looked fine. I hit Reload BPS Display and it immediately went to a 500 error.
    So, repeated everything above, but, this time, I hit setup after the pre-installation (everything was fine again for the pre-installation). Went to a 500 error again.
    I repeated all the steps to get back in again, and this time, I deactivated all plugins, cURL check was turned off, deleted the WP Rocket plugin and ran pre-installation. Results were fine. I ran setup and it went to a 500 error again.

    How can I get my site back to normal?

    #36670
    webstar
    Participant

    I should ask how do I debug what is causing the 500 error when I click on Setup? Is there a log I can check? Everything looks fine after the pre-installation check.
    I didn’t see anything in the Troubleshooting Steps for this issue.

    #36671
    AITpro Admin
    Keymaster

    Send a copy of the htaccess file that is causing the 500 error and your good auto_.htaccess file to me so I can compare them:  info at ait-pro dot com.

    #36672
    webstar
    Participant

    I’ve just sent you the files.
    I can see the difference now and where the htaccess file changes after the pre-installation wizard runs.
    But, I don’t know why it’s happening and how I can stop it from re-writing the htaccess incorrectly. I guess you’ll know how to fix that part.

    I forgot to mention, although, you can probably figure it out: The file labelled .htaccess was the auto_htaccess file. That one works. The one called htaccess-doesnt_work is the one that is generated after I run the pre-installation wizard and that causes the http 500 error.

    #36673
    AITpro Admin
    Keymaster

    I received your htaccess files/code and the problem is that you have invalid/bad code saved in this BPS Root Custom Code Text box:  10. CUSTOM CODE PLUGIN/THEME SKIP/BYPASS RULES. So each time you run the BPS Setup Wizard then the problem occurs again. To fix this problem do the steps below. This problem does not appear to be caused by WP Rocket and instead is caused by invalid/bad code/text saved in BPS Custom Code.

    1. Go to BPS Custom Code.
    2. Click the Root htaccess File Custom Code accordion tab button.
    3. Scroll down to Custom Code Text box:  10. CUSTOM CODE PLUGIN/THEME SKIP/BYPASS RULES and delete the invalid/bad code/text.
    4. Click the Save Root Custom Code button.
    5. Run the Pre-Installation Wizard and Setup Wizard again.

    Invalid/bad code/text which is causing the 500 error:

    # CUSTOM CODE PLUGIN/THEME SKIP/BYPASS RULES
    , etc.
    # If you add a new skip rule above skip rule 12 it will be skip rule 13:
    
    ,
    
    to
    
    is deleted than change
    
    will skip 12 following RewriteRules.
    # The skip rules MUST be in descending consecutive number order: 12, 11, 10, 9...
    # If you delete a skip rule, change the other skip rule numbers accordingly.
    # Examples: If RewriteRule
    #36674
    webstar
    Participant

    It didn’t work.

    But, there is a problem with the Custom Code.

    I make the changes and save it. I double check that it’s saved. And I see the incorrect code is gone.

    But, after I run the pre-installation wizard, I get a 500 error if I click on Reload BPS Display. I go into the root .htaccess file and delete the errant code to get my site working again and then check the Custom Code and that incorrect code is in there again.

    Why is the old code being restored?

    I also noticed that those skip rules seem to be duplicated. I have rules 22 to 13 which are a duplicate of 12 to 3.  I don’t have a rule for 2 and 1. Is not having rules 2 and 1 a problem?

     

    #36676
    AITpro Admin
    Keymaster

    Oops missed the duplicated plugin skip/bypass rules problem.  Try the steps below and let me know if they work or not.

    1. Go to BPS Custom Code.
    2. Under the Import/Export tools area/section on the Custom Code page, click the Delete button.  This will delete all of your custom code from all BPS Custom Code text boxes.
    3. Refresh your Browser once.
    4. Click the Root htaccess File Custom Code accordion tab button and double check that all of your Custom Code text boxes do not actually still have any code in them.  If you still see code in the Custom Code text boxes then this problem is being caused by Mod Security. Stop here and let me know that you still see code in the Custom Code text boxes.
    5. Run the Pre-Installation Wizard and Setup Wizard again.

    #36677
    webstar
    Participant

    Thanks, that fixed it.

    So, would you say it’s safe to install WP Rocket again?

    I understand you can’t guarantee issues won’t arise, I totally accept something could happen. But, now that it’s “clean”, do I need to do anything first to make sure the two work together after I install it?

    I’m going to send them a note too to see if they are aware of anything.

    From your end though, is there any issues I should be aware of or some thread I should read. I read something that was dated in 2016. Not sure if it’s applicable still.

    At this point, having run the pre-installation and setup, I have a full backup of my site, correct?

    If something does go wrong again after installing it, I could just regain access and restore everything using BPS, right?

    #36678
    AITpro Admin
    Keymaster

    I think the problem was just with BPS Custom Code and does not have anything to do with WP Rocket.  Install WP Rocket again and run the Pre-Installation Wizard and Setup Wizard.  Let me know if the same problem occurs or if everything is ok now.

    #36679
    webstar
    Participant

    Thanks. I’ll probably do this tomorrow and let you know how it goes.

    #36680
    webstar
    Participant

    Went smoothly, no hitches.

    My site is working very nicely now. Went from a D to a B on GTMetrix.

    Thanks!

    #36681
    AITpro Admin
    Keymaster

    Great!  Thanks for confirming everything is working now.

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