• Resolved do77

    (@do77)


    Hi,

    I would like to combine the css files of my website to speed it up a little bit. Unfortunately I am not 100% sure how to do it. I copied, for example, the css of contact form 7 from styles.css (css file of CF7) to the default WordPress style.css. But where can I now say that contact form 7 should look in style.css for the styling and not call styles.css?

    The only I found was the following:

    if ( ! defined( 'WPCF7_LOAD_CSS' ) )
    	define( 'WPCF7_LOAD_CSS', true );

    Can I simply delete those lines and the plugin will automatically pull the styles from the default WordPress CSS file?

    Many thanks,
    do77

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would really not bother trying to do this. If your site is slow for some reason then trying to aggregate all your style sheets won’t fix your problem.

    I have used the Contact Form 7 Plugin for a long time now and it hasn’t slowed my site(s) down at all.

    It is also a bad idea as your customisations won’t pick up updates to the Plugin if the styles are tweaked etc.

    Thread Starter do77

    (@do77)

    Hi dgwyer,

    thanks for your response. Its not that Contact Form 7 by itself slows down my site but having several plugins that each call seperate css and js files does slow down my site. So combining css and js files into fewer files should make a difference. At least if I believe YSlow 😉

    Any other ideas how to speed up the site. What about adding Expires Headers?

    Thanks,
    do77

    I have several Plugins active on lots of different sites without much of a problem. It’s pretty common for pages on WordPress installations to include many different style sheets and JS files, so I wouldn’t get too hung up about it.

    What do you think of your page load time, just by looking at it load in the browser? If you give me a link I will test my end.

    Also, in my experience it is more likely to be Plugins (or your theme) firing off too many db queries than included CSS or JS files, that could slow down your site. Check this Plugin to show you the number of db queries and performance for each page:

    http://wordpress.org/extend/plugins/sqlmon/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Combing CSS files – Need some advice’ is closed to new replies.