WordPress website solution (super detailed text tutorial)
Knowing and doing 2020-11-27 10:26:50
brief introduction : I built one myself WordPress Personal website : Recently, I found that the visit is slow , So we went through the investigation , Here's the optimized solution .

Preface


I built one myself WordPress Personal website :
Recently, I found that the visit is slow , So we went through the investigation , Here's the optimized solution .


Before optimization :
Loading time :21 second +
After optimization :
Loading time :250 millisecond
After optimization, the access speed is improved 84 times +

Solution flow chart

  • flow chart

problem & Solution & verification


Location problem ( Load one CSS Overtime )

WordPress Website solutions ( Super detailed text course )


Solution steps
Download access timed out CSS(Google Browser F12 Load can be found in CSS Address ) And save to local ( You can connect with it google The Internet )
https://fonts.googleapis.com/css?family=Open+Sans%3A400%2C700%2C400italic%7COpen+Sans%3A400%2C700%2C400italic%7CMontserrat%3A400%2C700&subset=cyrillic%2Clatin%2Clatin-ext%2Cgreek-ext

WordPress Website solutions ( Super detailed text course )



WordPress Website solutions ( Super detailed text course )


View the current WordPress Use theme ( Through other loads normal css You can see that the current use of bento The theme )

WordPress Website solutions ( Super detailed text course )


Enter server WordPress Program and the current use of the theme directory
cd /www/wwwroot/zhanghan.xin/wp-content/themes/bento/

WordPress Website solutions ( Super detailed text course )


Find references css The file of ( Here all.css For example , Because from F12 It turns out that all.css It's a local load )
find . | xargs grep -ril 'all.css

WordPress Website solutions ( Super detailed text course )


see functions.php Content , And locate all.css Location , Find out the load through analysis google Of css Code
vim functions.php

WordPress Website solutions ( Super detailed text course )


The modification code is read locally css file

WordPress Website solutions ( Super detailed text course )


Download the local ones before css.css Upload to the server's current theme file directory

WordPress Website solutions ( Super detailed text course )


verification
Visit the website again , It is found that the loading speed is normal and the style loading is normal

WordPress Website solutions ( Super detailed text course )


summary

When problems are solved, summarize and share them in time , On the one hand, if you encounter similar problems in the future, you can refer to the blog to solve them quickly , On the other hand, it provides a solution for other bloggers

original text :https://developer.aliyun.com/article/778422?spm=a2c6h.12873581.0.0.7afd767do1nyKW&groupCode=othertech
版权声明
本文为[Knowing and doing]所创,转载请带上原文链接,感谢
https://fheadline.com/2020/11/20201127102434873h.html
相似文章

2021-08-09