Hello,
You can our htaccess file in this tutorial: https://forum.tagdiv.com/how-to-make-the-site-faster/ – http://screencast.com/t/sB6z5ifSLl
Thank you!
You can find my example mod page speed settings I believe in my long winded tutorial, or someplace in the forum history as we fully enabled this — using WP and Newspaper — back in Jan. 2014.
Note the mod_pagespeed settings should be optimized for WordPress; they are not “theme” specific. There are numerous tutorials online re setting up mod_pagespeed to work with WordPress you may want to look at, going back to late 2013, and mostly in 2014. There is some trial and error.
Upshot, it’s not theme related, but WordPress related.
For example, you should NOT use lazy load, not use minification other than comment removal and spaces removal, and ideally not use things that move scripts to bottom or top of page as theme already does that, as does WP.
Point being there is not one ideal “snapshot” of a config file for every server, and setup.
For example, you may want to put the path to a static folder location. Read docs on how to do that.
You may want to hook mod_pagespeed to connect to caching module on server, but you would need to actually work with your hosting provider to set that up properly.
Using mod_pagespeed with external resources is also tricky, such as CDN, where you need to put in lines to specify how that connects — if using cloudflare they should be able to help you with that.
Again, mod_pagespeed is *not* theme specific, but WordPress and Cloudflare setup should be addressed to the Cloudflare folk.
Thank you Chris S,
I tried
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_dns_prefetch
</IfModule>
this but it increases load time of website
I am using CloudFlare and default .htaccess which is provided by tagdiv team in this tutorial https://forum.tagdiv.com/how-to-make-the-site-faster/
You need to edit your pagespeed.conf file to be optimized for your site, caching module, CDN loading, etc.
Are you running mod_pagespeed on your server /VPN, or are you doing that via Cloudflare ?
We have our own dedicated high end server here, so we manage our own stuff and don’t need CDN, so my suggested settings only address the ideal setting AFTER you setup the pagespeed.conf file properly with the Apache module (see the Google docs on how that works).
For instance, if you are running the module on your own server/VPN, and loading stuff off CDN, you have to actually tell mod_pagespeed where those CDN resources *are* — for our test we setup a subdomain as cdn.oursite.ooo which was a CNAME for the CDN bucket.
But again, not theme specific, so likely best to talk to Cloudflare and explain your use of mod_pagespeed and how best to connect. 🙂