• Hi

    It seems the plugin stopped working as no longer appears in the response headers. However caching is working by cloudflare with the “cf-cache-status: HIT”. But i am not seeing the x-wp-cf-super-cache lines anymore.

    I havent messed with the plugin or installed anything else. Can you take a look if its working or not?

    Here is my .htaccess

    # BEGIN WP Rocket v3.8.0.1
    # Redirect www to non-www
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.amazingdesignsus\.com [NC]
    RewriteRule ^(.*)$ https://amazingdesignsus.com/$1 [L,R=301]
    # Use UTF-8 encoding for anything served text/plain or text/html
    AddDefaultCharset UTF-8
    # Force UTF-8 for a number of file formats
    <IfModule mod_mime.c>
    AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
    </IfModule>
    # FileETag None is not enough for every server.
    <IfModule mod_headers.c>
    Header unset ETag
    </IfModule>
    # Since we’re sending far-future expires, we don’t need ETags for static content.
    # developer.yahoo.com/performance/rules.html#etags
    FileETag None
    <IfModule mod_alias.c>
    <FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$">
    <IfModule mod_headers.c>
    Header set X-Powered-By "WP Rocket/3.8.0.1"
    Header unset Pragma
    Header append Cache-Control "public"
    Header unset Last-Modified
    </IfModule>
    </FilesMatch>
    <FilesMatch "\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
    <IfModule mod_headers.c>
    Header unset Pragma
    Header append Cache-Control "public"
    </IfModule>
    </FilesMatch>
    </IfModule>
    # Expires headers (for better cache control)
    <IfModule mod_expires.c>
    	ExpiresActive on
    	ExpiresDefault                              "access plus 1 month"
    	# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
    	ExpiresByType text/cache-manifest           "access plus 0 seconds"
    	# Your document html
    	ExpiresByType text/html                     "access plus 0 seconds"
    	# Data
    	ExpiresByType text/xml                      "access plus 0 seconds"
    	ExpiresByType application/xml               "access plus 0 seconds"
    	ExpiresByType application/json              "access plus 0 seconds"
    	# Feed
    	ExpiresByType application/rss+xml           "access plus 1 hour"
    	ExpiresByType application/atom+xml          "access plus 1 hour"
    	# Favicon (cannot be renamed)
    	ExpiresByType image/x-icon                  "access plus 1 week"
    	# Media: images, video, audio
    	ExpiresByType image/gif                     "access plus 4 months"
    	ExpiresByType image/png                     "access plus 4 months"
    	ExpiresByType image/jpeg                    "access plus 4 months"
    	ExpiresByType image/webp                    "access plus 4 months"
    	ExpiresByType video/ogg                     "access plus 4 months"
    	ExpiresByType audio/ogg                     "access plus 4 months"
    	ExpiresByType video/mp4                     "access plus 4 months"
    	ExpiresByType video/webm                    "access plus 4 months"
    	# HTC files  (css3pie)
    	ExpiresByType text/x-component              "access plus 1 month"
    	# Webfonts
    	ExpiresByType font/ttf                      "access plus 4 months"
    	ExpiresByType font/otf                      "access plus 4 months"
    	ExpiresByType font/woff                     "access plus 4 months"
    	ExpiresByType font/woff2                    "access plus 4 months"
    	ExpiresByType image/svg+xml                 "access plus 1 month"
    	ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
    	# CSS and JavaScript
    	ExpiresByType text/css                      "access plus 1 year"
    	ExpiresByType application/javascript        "access plus 1 year"
    </IfModule>
    # Gzip compression
    <IfModule mod_deflate.c>
    # Active compression
    SetOutputFilter DEFLATE
    # Force deflate for mangled headers
    <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    # Don’t compress images and other uncompressible content
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
    </IfModule>
    </IfModule>
    # Compress all output labeled with one of the following MIME-types
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
    		                          application/javascript \
    		                          application/json \
    		                          application/rss+xml \
    		                          application/vnd.ms-fontobject \
    		                          application/x-font-ttf \
    		                          application/xhtml+xml \
    		                          application/xml \
    		                          font/opentype \
    		                          image/svg+xml \
    		                          image/x-icon \
    		                          text/css \
    		                          text/html \
    		                          text/plain \
    		                          text/x-component \
    		                          text/xml
    </IfModule>
    <IfModule mod_headers.c>
    Header append Vary: Accept-Encoding
    </IfModule>
    </IfModule>
    # END WP Rocket
    # BEGIN WordPress
    # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    RewriteEngine On
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    # BEGIN WP-HUMMINGBIRD-CACHING
    # The directives (lines) between <code>BEGIN WP-HUMMINGBIRD-CACHING</code> and <code>END WP-HUMMINGBIRD-CACHING</code> are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    # END WP-HUMMINGBIRD-CACHING
    # BEGIN WP Cloudflare Super Page Cache
    # The directives (lines) between "BEGIN WP Cloudflare Super Page Cache" and "END WP Cloudflare Super Page Cache" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_headers.c>
    Header unset Pragma "expr=resp('x-wp-cf-super-cache-cache-control') != ''"
    Header always unset Pragma "expr=resp('x-wp-cf-super-cache-cache-control') != ''"
    Header unset Expires "expr=resp('x-wp-cf-super-cache-cache-control') != ''"
    Header always unset Expires "expr=resp('x-wp-cf-super-cache-cache-control') != ''"
    Header unset Cache-Control "expr=resp('x-wp-cf-super-cache-cache-control') != ''"
    Header always unset Cache-Control "expr=resp('x-wp-cf-super-cache-cache-control') != ''"
    Header always set Cache-Control "expr=%{resp:x-wp-cf-super-cache-cache-control}" "expr=resp('x-wp-cf-super-cache-cache-control') != ''"
    </IfModule>
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresByType application/xml "access plus 0 seconds"
    </IfModule>
    <FilesMatch "robots\.txt">
    <IfModule mod_headers.c>
    Header set Cache-Control "max-age=0, public"
    </IfModule>
    </FilesMatch>
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} ^(.*)?/wp-content/wp-cloudflare-super-page-cache/amazingdesignsus.com/debug.log(.*)$
    RewriteRule ^(.*)$ - [F]
    </IfModule>
    <FilesMatch "wp-cron.php">
    <IfModule mod_headers.c>
    Header set Cache-Control "max-age=0, public"
    </IfModule>
    </FilesMatch>
    # END WP Cloudflare Super Page Cache
    

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @charlieve02,
    The htaccess code you have shared I am seeing that the file has been taken over by WP Rocket removing the code added by this plugin. Are you using WO Rocket on your site? If so, please ensure you have disabled all kinds of page caching and mobile caching insie WP Rocket and only using it for CSS/JS optimization.

    Also inside this plugin’s 3rd party tab, ensure the WP Rocket settings have been selected properly. Screenshot: https://i.imgur.com/AtjNeku.png

    After that inside the plugin settings, at the op use the “Disable Page Cache” button and then again click on “Enable Page Cache” to see if you see this plugin’s code in the htaccess file instead of WP Rocket codes. There should not be any WP Rocket code inside htaccess. WP Rocket is what causing the problem.

    Thread Starter charlieve02

    (@charlieve02)

    Yes I am using WP rocket. Just disabled mobile caching, Currently only using it for CSS/JS optimization. Also using these feautures: Preload links, Prefetch DNS Requests and Preload Fonts. Thats all.

    I have the same settings in the plugin’s 3rd party tab. Followed all instructions but still the same problem. But I am seeing that your plugin’s codes its in fact in the htaccess code but at the buttom of it.

    What do you suggest?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @charlieve02,
    I can see the plugin is working perfectly on your website and your webpages are being served from Cloudflare CDN. Screenshot: https://i.imgur.com/Z8XLwFO.png

    Thread Starter charlieve02

    (@charlieve02)

    Thank you

    Is it normal that in the first load of any page the cf-cache-status is MISS, but then after reloading the page it changes to HIT ?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @charlieve02,
    The first request is when Cloudflare received the request and cache it and it will remain cached unless you clear the cache. So, from second request onwards the page is being served from CDN.

    Thats why there is a fallback disk-level cache for the first request when it is not yet cached by CF the page, gets provided via fallback cache (if enabled).

    Thread Starter charlieve02

    (@charlieve02)

    OK, i have it enabled.

    So is this the ideal behavior? Or is there a way to get it load a cache version of every page in the first load?

    Maybe adding the sitemap links to the preload feature of your plugin?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @charlieve02,
    The sitemap preloading will help a bit but if you want to request your page from across the world to ensure it is cached at most places, you can use this tool: https://www.uptrends.com/tools/cdn-performance-check

    Just enter your web page URL and fetch from all checkpoints to ensure you have already made the first request.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Plugin stopped working’ is closed to new replies.