Scenario: - My site pages and most pages usually loads around 3s to 5s. - I have a lot of posts on my site and new posts are added every 12 hours. I did not use any on site caching plugin to avoid large diskspace usage for cache files. - I am using cloudflare cache with expiry set to 8hours so that my front page, categories and archive pages can be updated with fresh contents accordingly.
Problem: - I wanted to improve my google page speed score and tried to run plugins like autoptimize which can auto minify and defer render blocking of css and js. - These plugins improved my page rank score tremendously for cached pages. - However these plguins actually made my site slower as they add 5 to 10 seconds to first load of uncached pages for them to do their minifying and cache writing.(My cache expire every 8 hours)
Question: Under my scenario, is there a way that I able to retain/improve my usual site speed and satisfy pagespeed minify and script defer requirement?
Scenario: - My site pages and most pages usually loads around 3s to 5s. - I have a lot of posts on my site and new posts are added every 12 hours. I did not use any on site caching plugin to avoid large diskspace usage for cache files. - I am using cloudflare cache with expiry set to 8hours so that my front page, categories and archive pages can be updated with fresh contents accordingly.
Problem: - I wanted to improve my google page speed score and tried to run plugins like autoptimize which can auto minify and defer render blocking of css and js. - These plugins improved my page rank score tremendously for cached pages. - However these plguins actually made my site slower as they add 5 to 10 seconds to first load of uncached pages for them to do their minifying and cache writing.(My cache expire every 8 hours)
Question: Under my scenario, is there a way that I able to retain/improve my usual site speed and satisfy pagespeed minify and script defer requirement?
Share Improve this question asked May 26, 2019 at 22:08 CalvinCalvin 757 bronze badges 4- You could build a cache warmer and let it run on crons to cURL all URLs in your sitemap or something like that. – norman.lol Commented May 26, 2019 at 22:40
- 1 You can minify and defer by hand, plugins such as autoptimise aren't needed and are more like a brute force hammer approach ( they also cripple your TTFB times etc ), but keep in mind that minifying javascript and CSS isn't a WP question, and would be better asked on stackoverflow, and that sometimes deferring a script doesn't improve performance ( e.g. if your site requires jQuery to display things, deferring it may not be so useful ). Page speed is a guide, not a law, if you're doing this for SEO purposes, it goes off of the loading times, not the things in the pagespeed tests – Tom J Nowell ♦ Commented May 26, 2019 at 22:41
- Thanks for your suggestion Tom J Nowell. I have followed your advice and manually minify .js and .css files before hand, instead of using a plugin to do it for me everytime the page loads. Like you said do not used a brute force hammer. – Calvin Commented May 27, 2019 at 4:58
- Additional information request. Post on pastebin and share the links. RAM size of your MySQL Host server A) complete (not edited) my.cnf or my.ini Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count, for server workload tuning analysis to reduce your typical 3-5s loads. – Wilson Hauck Commented May 30, 2019 at 13:28
1 Answer
Reset to default 1In the end, I used speed booster plugin to defer javascript and inline CSS. For minifying, I manually minify the .js script and .css files before hand. This helped to improve my pagespeed score without going through first load issue.
Like Tom J Nowell suggested, do not use brute force hammer approach by using plugins like autoptimize which actually made the task more complex.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745461733a4628737.html
评论列表(0条)