Site logo

Archived topic

manually optimize gp

20 replies · Started by sg on May 3, 2018

Viewing posts 1–15 of 21

Hi guys, i intend to do this.

combine all the css into one file and delete the ref for other css.
where can i do this ? snippets ? child theme ?

there is 10+ css loaded in the front end . i choose all option except woocommerce for my GP Premium,
i am aware of the autooptimize, and cache plugins, im using both .

any help appreciated.

HI tom, i intend to use less plugin and manually minify and reduce number of css files ref if possible. able to achieve so many till now. its amazing how when you take things on your hand try to take control . cheers

Manually minifying the GP files would involve creating your own CSS/JS, then dequeuing the ones added by the theme.

yes. this is what i am looking for. could you guide along pls.

Which files have you manually combined?

If you let me know which files, I can write the code to disable GP from loading those files.

A big issue with doing this is you won't receive code updates to those files, which could cause errors in future updates.

For example, if I change code in navigation-search.min.js and you're using the old code, it could break your site javascript.

That's why solutions like Autoptimize are awesome - they update it for you.

Hi tom. sorry missed this.

i have manually combine style.min.css ,mobile.min.css ,

While it's possible to remove the style.min.css file, it will likely break your website, as tons of the dynamic CSS depends on that file existing.

If you want to do it anyways, you can do this:

add_action( 'wp_enqueue_scripts', function() {
    wp_deregister_script( 'generate-style' );
}, 50 );

The benefits of combining those two files definitely don't outweigh the negatives of doing this.

Hi tom.

i have some workaround for all this.
i have simple CSS and js pro in my site.

what I could do is dequeue all GP scripts and CSS and put it as inline CSS in the plugins.

will that help to improve optimizations?

my site is very complicated and cant use those minifying plugins. still trying ..Thanks

Yes , i cant . many conflicts.

small sizes yes. but the request are still more then 10 ?

GP shouldn't have that many requests? Are you going to optimize all of your plugins like this as well? I can't help but think it would be easier to figure out why plugins like Autoptimize are conflicting, instead of trying to deconstruct themes/plugins.

What kind of conflicts are you running into?

i am on toolset, autoptimize is a no-no there :(

so, i cant touch toolset, i was thinking to improve on other plugins and themes that have many request on css and js. is there any way to merge generate press css and style only manually ? will the inclusion rules works?

i am now dropping autoptimize as it doesnt have finer control.

using swift performance plugins now.

I believe Swift should combine and minimize your files. Is it working for you?

This archived topic is closed to new replies.