Comet Cache – installation and setup

Home Forums BulletProof Security Pro Comet Cache – installation and setup

Tagged: 

This topic contains 5 replies, has 3 voices, and was last updated by  jenni101 1 year, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29731

    AITpro Admin
    Keymaster

    UPDATE: BPS Pro 13+ and BPS 2.0+ versions have a feature called: Setup Wizard AutoFix (AutoWhitelist|AutoSetup|AutoCleanup) that automatically creates plugin and theme whitelist rules and automatically sets up and cleans up caching plugins htaccess code.

    BPS Pro:  Comet Cache basic installation and setup notes:

    1. Turn off AutoRestore.
    2. Go to F-Lock and unlock your wp-config.php file.
    3. Install and activate Comet Cache.
    4. Go to F-Lock and lock your wp-config.php file and click the Save Options button.
    5. Re-run the Pre-Installation Wizard and Setup Wizard or you can use the AutoRestore manual controls and click the Root Backup Files button and the wp-content Backup Files button and turn AutoRestore back On if you do not want to run the Wizards again.

    Additional Notes for Go Daddy Hosting or other Hosts that use APC opcode Cache:
    Comet Cache will display a message about manually adding this line of code: ini_set('apc.cache_by_default', false); in your wp-config.php file IF your particular web host uses APC opcode caching.
    _____________________________________________

    BPS & BPS Pro:  Comet Cache setup if you are using any of these Comet Cache (free or Pro) htaccess options : Enable GZIP Compression, Leverage Browser Caching, Enforce an Exact Hostname, Enforce Canonical URLs & Send Access-Control-Allow-Origin Header.

    1. BPS Pro: Turn off AutoRestore.
    2. BPS Pro: Go to F-Lock and unlock both your Root .htaccess file and your wp-config.php file.
    2. BPS free: Go to the htaccess File Editor page, click the Unlock htaccess File button and click the Turn Off AutoLock button.
    3. Go to the Comet Cache Settings page and resave all of your Comet Cache settings.
    4. Go to the htaccess File Editor tab page > Your Current Root htaccess File tab > Copy the Comet Cache .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. BPS Pro: 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.
    6. BPS free: Go to the htaccess File Editor page, click the Lock htaccess File button and click the Turn On AutoLock button.
    7. BPS Pro: Re-run the Pre-Installation Wizard and Setup Wizard.
    7. BPS free: Re-run the Setup Wizard.

    #32737

    Vintagepornbay.com
    Participant

    [BPS free Topic has been merged into this relevant Topic]
    Hi i have installed comet cache and the problem on Comet Cache is while using Bulletproof security plugin the gzip option from the comet cache dont work.

    I think it is conflicting with bps.

    #32739

    AITpro Admin
    Keymaster

    BPS and BPS Pro have been tested with the most current versions of Comet Cache and Comet Cache Pro and there are not any conflicts or issues with any Comet Cache options (GZIP, etc) or anything else.  What we have found works best is using Comet Cache for static page caching and using the BPS Speed Boost Cache code for Browser/GZIP compression caching instead of the Comet Cache GZIP htaccess code.

    If you would like to use Comet Cache GZIP Compression htaccess code instead of BPS Speed Boost Cache code then do these steps:
    1. Enable the Comet Cache GZIP Compression option setting (generates this example Comet Cache GZIP Compression htaccess code below at the top of your BPS root htaccess file).

    # BEGIN Comet Cache WmVuQ2FjaGU (the WmVuQ2FjaGU marker is required for Comet Cache; do not remove)
    
    # Enable GZIP compression.
    <IfModule deflate_module>
    <IfModule filter_module>
    AddOutputFilterByType DEFLATE text/plain text/html
    AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
    AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
    AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE font/opentype application/font-otf application/x-font-otf
    AddOutputFilterByType DEFLATE font/truetype application/font-ttf application/x-font-ttf
    </IfModule>
    </IfModule>
    
    # END Comet Cache WmVuQ2FjaGU

    2. Go to the BPS htaccess File Editor tab page > Your Current Root htaccess File tab > Copy the Comet Cache GZIP Compression htaccess code > paste the Comet Cache GZIP Compression htaccess code into this BPS Root Custom Code text box:  1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE
    3. Click the Save Root Custom Code button.
    4. Go to the Security Modes page and click the Root Folder BulletProof Mode Activate button.

    #32933

    jenni101
    Participant

    [Topic has been merged into this relevant Topic]
    Hiya,

    Just updated my site, including a long overdue update of the Speed Boost custom code, and came across some other options that can be added to the .htaccess file in the Comet Cache plugin. They are as follows:

    1. To enforce an exact hostname: Create or edit the .htaccess file in your WordPress installation directory and add the following lines to the top:
    # Enforce exact host name.
    
    RewriteEngine on
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} !^www.mysite.co.nz$
    RewriteCond %{HTTPS} !^on$ [NC]
    RewriteCond %{HTTP:X-Forwarded-Proto} !^https$ [NC]
    RewriteRule .* http://www.mysite.co.nz%{REQUEST_URI} [R=301,L]
    
    RewriteCond %{HTTP_HOST} !^www.mysite.co.nz$
    RewriteCond %{HTTPS} ^on$ [NC,OR]
    RewriteCond %{HTTP:X-Forwarded-Proto} ^https$ [NC]
    RewriteRule .* https://www.mysite.co.nz%{REQUEST_URI} [R=301,L]

    Which looks similar (to me) to what goes in to the BPS custom code box #8 for non-www to www.

    And:

    2. To enforce Canonical URLs: Create or edit the .htaccess file in your WordPress installation directory and add the following lines to the top:

    ## Force a trailing slash on all virtual requests (except WP admin area).
    
      RewriteEngine On
      RewriteBase /
    
      # If not a real file or directory.
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
    
      # Not a part of the WP admin area.
      RewriteCond %{REQUEST_URI} !(?:^|/)wp\-admin(?:/|$)
    
      # Not a REST request, which never redirects.
      RewriteCond %{REQUEST_URI} !(?:^|/)wp-json(?:/|$)
    
      # If there is no trailing slash.
      RewriteCond %{REQUEST_URI} !/$
    
      # Force a trailing slash on all virtual requests.
      RewriteRule ^(.*)$ $1/ [QSA,L,R=301]

    But not quite sure where this would go.

    I’d appreciate your take on the above 2 suggested edits for the .htaccess file
    – whether you think they’re OK?
    – if you think they’re worthwhile to add in?
    – and if so where’s best to put them in the BPS custom code?

    Many thanks, j

    #32939

    AITpro Admin
    Keymaster

    @ jenni101 – You would use this option – “To enforce an exact hostname” if you are experiencing this problem on your website:  https://github.com/websharks/comet-cache/issues/101  You would use this option – “To enforce Canonical URLs” if you are seeing broken CSS/images:  https://github.com/websharks/comet-cache/issues/798  So in other words, if things are working correctly now without any problems then you would not want to use either of these options.  If you are experiencing a problem with either of these things then you would use the option that fixes that problem.

    #32940

    jenni101
    Participant

    Ah ha! Now I understand! So as all good will leave well alone.

    Many thanks, j

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.