• Resolved bigkahuna

    (@ajcvet)


    good day, I have this plugin on several of my sites. it’s very good. However, on this site, which I have the same settings as the rest, I do not get the wp-optimize code in my .htaccess file. Nothing there about wp-optimize. I expect it to have written;
    # BEGIN WP-Optimize Browser Cache
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css “access 28 days”
    ExpiresByType text/html “access 28 days
    etc
    <IfModule mod_headers.c>
    <filesMatch “\.(ico|jpe?g|png|gif|webp|swf)$”>
    Header set Cache-Control “public”
    </filesMatch>
    etc
    and:
    </IfModule>
    #Disable ETag
    FileETag None
    # END WP-Optimize Browser Cache

    I’ve tried disabling/deleting reloading the plugin but it just doesn’t add the code to the .htaccess file. Also, when I run tests on the site (gtmetrix, Pingdom) the results show no leverage browser caching, no expired headers which I believe this plugin addresses.

    can you suggest anything I can try? should/can I copy the wp-optimize code from one of the other sites that has the code to this sites .htaccess file ??

    Any suggestions/guidance is appreciated.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi,

    Have you already enabled the feature via the relevant setting?

    settings screen

    When doing this, the code should be added in the .htaccess. If it wasn’t, WordPress might not have the ability to write to it. In which case you could add the same code as one of your other sites.

    Marc.

    Thread Starter bigkahuna

    (@ajcvet)

    good day and thanks for the reply. I’ll look further into the code and .htaccess on my other sites soon. However, on the site <badcreditloans.network> where I’ve had wp-optimize loaded and active for a while, with the “Browser static file caching headers are currently enabled.” when I do a test with gtmetrix the results show;
    Leverage browser caching (F)
    Add expired headers (F)
    aren’t these 2 issues addressed by the wp-optimize plugin ??

    Thread Starter bigkahuna

    (@ajcvet)

    just another update; on another of my sites which also has wp-optimize loaded and active with “Browser static file caching headers are currently enabled.”, when I run the gtmetrix test the results are;
    Leverage browser caching A(96)
    Add Expires headers D(67)
    This site has the same code in the .htaccess file as <badcreditloans>. ???

    Hi,
    It appears that you use CloudFlare to protect your site, and it overrides some things. Browser caching can be one of them.
    So I would suggest checking your CloudFlare settings.
    (You can look at this CloudFlare forum thread: https://community.cloudflare.com/t/leverage-browser-caching-and-specify-a-cache/3616)
    Marc.

    Thread Starter bigkahuna

    (@ajcvet)

    I just signed up to Cloudflare. the 2 sites results I’m talking about were pre Cloudflare.

    Thread Starter bigkahuna

    (@ajcvet)

    On another note, because I’ve started using Cloudflare do I need wp-optimize plugin. They seem to do about the same things. I’m wondering are they conflicting with each other ??

    They shouldn’t conflict with each other (we use both on our own website). But there are areas where they overlap.
    For example Gzip compression, and apparently browser caching.
    The file caching in WP-Optimize is still very useful, as well as the other optimisations options.

    Thread Starter bigkahuna

    (@ajcvet)

    which do you use for the gzip and browser caching ? (plugin or Cloudflare)

    Compression is handled by cloudflare by default (it uses Brotli compression, which is a bit better than gzip) and we have browser caching enabled on our servers already.

    For browser caching, it depends on what place you want to manage those settings, as the effect is the same.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘no .htaccess code’ is closed to new replies.