RogerM
Well-known member
I am not a web developer (duh, right?!
) but I am currently learning HTML, CSS, and JS.
My main goal with this is NOT to be able to write an app, theme, or plugin from scratch. My main goal is to be able to read and understand the logic of programming that´s behind of any WordPress based site´s theme and plugin so I can improve its page loading speed.
This will allow me to expand my services as an SEO Consultant and offer a more well-round service.
Personally, I use WP Rocket. I think it´s the best performance plugin for WP (If you´re a web developer and disagree with this. Please, let me know what are your go-to performance plugins for WP)
Right now, I would like to focus on how to remove unused HTML, CSS, and JS from WordPress based sites.
I know how to detect it by going into Chrome DevTool > Coverage.
I have VSC installed on my PC and I can just copy/paste the code in there from the WP theme I am working on and just delete the lines of codes that appear on red in the DevTool tab.
But this is a very time-consuming task as some sites show tens of thousands of lines of code.
Is there a way to automate this?
I´ve seen a couple of YouTube videos when the instructor mentions an app called PurgeCSS but it looks too complicated/advanced for me.
I´ve also tried using online cleaning HTML/CSS codes like...
unused-css
purifycss
But when editing the respective file with the "clean" CSS code generated from those tools, I always break the site up.
Thoughts?
My main goal with this is NOT to be able to write an app, theme, or plugin from scratch. My main goal is to be able to read and understand the logic of programming that´s behind of any WordPress based site´s theme and plugin so I can improve its page loading speed.
This will allow me to expand my services as an SEO Consultant and offer a more well-round service.
Personally, I use WP Rocket. I think it´s the best performance plugin for WP (If you´re a web developer and disagree with this. Please, let me know what are your go-to performance plugins for WP)
Right now, I would like to focus on how to remove unused HTML, CSS, and JS from WordPress based sites.
I know how to detect it by going into Chrome DevTool > Coverage.
I have VSC installed on my PC and I can just copy/paste the code in there from the WP theme I am working on and just delete the lines of codes that appear on red in the DevTool tab.
But this is a very time-consuming task as some sites show tens of thousands of lines of code.
Is there a way to automate this?
I´ve seen a couple of YouTube videos when the instructor mentions an app called PurgeCSS but it looks too complicated/advanced for me.
I´ve also tried using online cleaning HTML/CSS codes like...
unused-css
purifycss
But when editing the respective file with the "clean" CSS code generated from those tools, I always break the site up.
Thoughts?