WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding expires headers in wordpress multisite (14 posts)

  1. leosampieri
    Member
    Posted 1 year ago #

    hello,
    i've been setting belgranostudio.com .htaccess file, with all the expire and gzip compresion settings that I could find on the web, and my tests have really improved. I've implemented a CDN also, Cloudflare.
    But this settings don't seem to affect the subdomains performance that much; everyhing is going faster, anyway.
    I don't want to use a plugin like W3; if there's some other solution, I'll be glad to hear it.

    Thanks everybody !
    L.

  2. .htaccess rules apply to all subdomains on the network, same as the main site.

  3. leosampieri
    Member
    Posted 1 year ago #

    YSlow gives me very different metrics, between the main site and the subdomain...
    thanks !

  4. leosampieri
    Member
    Posted 1 year ago #

    And yet it marks in the subdomain some issues that it doesn't on the main site...

  5. *eyes ySlow*

    I get the same results on my domain, mapped domain, and subdomain.

    Can you share your sites?

  6. leosampieri
    Member
    Posted 1 year ago #

    They're
    belgranostudio.com
    and
    online.belgranostudio.com
    But I've got them behind a 'comming soon' plugin, until they're ready.
    Whenever you tell me I can disable the plugin to let you do the tests.

  7. leosampieri
    Member
    Posted 1 year ago #

    Right now, and for a couple of hours, i'm gonna have the sites online.

  8. leosampieri
    Member
    Posted 1 year ago #

    Here are the results of gmetrix,
    http://gtmetrix.com/compare/5wbxh1it/cPIGGvRO

  9. Are the sites running the same theme and plugins? You'd have to look at WHAT it's barking at, since I know I regularly get yelled at because Google's not got the right expires on their own JS.

  10. leosampieri
    Member
    Posted 1 year ago #

    Yes, same theme. Same plugins.
    I'll check what you're saying.
    Thanks !

  11. Assuming you put the expires in your .htaccess... what'd you put? :)

    I used this:

    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType image/jpg "access 1 year"
        ExpiresByType image/jpeg "access 1 year"
        ExpiresByType image/gif "access 1 year"
        ExpiresByType image/png "access 1 year"
        ExpiresByType image/x-icon "access 1 year"
    
        ExpiresByType text/css "access 1 month"
        ExpiresByType text/html "access 1 hour"
    
        ExpiresByType application/pdf "access 1 month"
        ExpiresByType application/x-javascript "access 1 month"
        ExpiresByType application/javascript "access 1 month"
        ExpiresByType text/javascript "access 1 month"
        ExpiresByType text/x-js "access 1 month"
    
        ExpiresByType application/x-shockwave-flash "access 1 month"
    
        ExpiresByType video/quicktime "access 1 month"
        ExpiresByType audio/mpeg "access 1 month"
        ExpiresByType video/mp4 "access 1 month"
        ExpiresByType video/mpeg "access 1 month"
        ExpiresByType audio/ogg  "access 1 month"
        ExpiresByType video/ogg  "access 1 month"
    
        ExpiresDefault "access 2 days"
    </IfModule>
  12. leosampieri
    Member
    Posted 1 year ago #

    I used this. Dont remember where I got it from.

    ## EXPIRES CACHING ##
    
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 7 days"
    </IfModule>
    
    ## EXPIRES CACHING ##
  13. leosampieri
    Member
    Posted 1 year ago #

    It looks almost identical.
    Anyway, I'm relying on Cloudflare to make my sites faster; I don't think I'm going to spend mucho more time on this issue.
    Things are going fast enough for me. Still surprised !!.
    Cheers !!.

  14. I went with mod_pagespeed to make things zippier ;) I don't like CDNs.

Topic Closed

This topic has been closed to new replies.

About this Topic