This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.



Rather than having several calls to several CSS, it is better for your visitors
to have only one stylesheet. This speeds up load times, allows a more efficient cache management.

But for developing the CSS, it is often preferable to manage multiple
specific files, specialized (one for reset, one for print version, another for small screens, etc..)

The purpose of this plugin is to allow you to work with various files, but merge them into
one single file when the browser need it.

It can be generate each time (during development) or use a cache-file when finished.

It will optimize the CSS by removing all unnecessary characters that increase the
CSS (tabs, spaces, line breaks …).

All comments will be deleted – but you can insert a few lines at the top, to specify such a
copyright …


Author: Richard Carlier

Plugin URI: rc_CSS

Thanks: Mathieu Bouillot (The idea of this plugin came after discussion with him …)

Donate: Not for me, but for French Multiple Sclerosis Society, or equivalent…


  • header.php, before/after using rc_css plugin
  • example (excerpt) of rc_css generated.css stylesheet (no indentation, no comment, @media...)
  • option screen...


Upload rc_css/ directory to the /wp-content/plugins/ directory

Activate the plugin through the Plugins menu in WordPress

Place all your CSS in your theme directory (as usual) including style.css with WordPress comments.


Create an empty file called rc_css_style.css in this directory (or copy the one included),
and put 0666 permission (PHP need to rewrite this file).

In your header.php, replace (for example):
<link rel="stylesheet" href="/reset.css” type=”text/css” />
<link rel="stylesheet" href="/print.css” type=”text/css” media=”print” />
<link rel="stylesheet" href="/mobile.css” type=”text/css” media=”screen and (max-width: 400px)” />
<link rel="stylesheet" href="/style.css” type=”text/css” media=”all” />


Order is important (for your CSS, as usual…). The function rc_css_echo_style() should be at the end.

Optionnaly, you can go to “Admin” > “Appareance” > “rc_CSS – Merge and optimize CSS”
to specify comments that will be added at the top of css.


rc_css_enqueue_style( $css_filename , $css_media );
    $css_filename(string) : css filename, located in wp-content/themes/YOURTHEME/
    $css_media(string)(optional) : media query ( see ) or all by default

rc_css_echo_style( $generate );
    $generate (boolean)(optional) : create file (1/True) or use existing file (0/False)
        - during development => true
        - for exploitation => false (or nothing)
        - if true, it's create a file



  • Verify than your rc_css_style.css is located in you theme directory.
  • Verify the chmod of it (0666 – need to be writable).

Contributors & Developers

“rc-CSS” is open source software. The following people have contributed to this plugin.


Translate “rc-CSS” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.


1.0 – This is version 1…