sandywp / plugins / wp-scss
WP-SCSS
Compiles .scss files to .css and enqueues them.
Ready in seconds.
v5.1.1 40,000+ installs WP 3.0.1+ PHP 7.2+

About this plugin
Compiles .scss files on your wordpress install using ScssPhp. Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing.
The plugin only compiles when changes have been made to the scss files. Compiles are made to the matching css file, so disabling this plugin will not take down your stylesheets. In the instance where a matching css file does not exist yet, the plugin will create the appropriate css file in the css directory.
Questions
- Can I use a child theme?
Yes, absolutely. Make sure you define your directories relative to your child theme and that your child theme is active. Otherwise you’ll see an error regarding missing directories.
- What version of PHP is required?
PHP 7.2 is required to run WP-SCSS
- How do I @import subfiles
You can import other scss files into parent files and compile them into a single css file. To do this, use @import as normal in your scss file. All imported file names must start with an underscore. Otherwise they will be compiled into their own css file.
When importing in your scss file, you can leave off the underscore.
@import 'subfile';- Can I configure the plugin in code?
Yes. Define WP_SCSS_OPTIONS in wp-config.php as an array using the same keys as the settings page (base_compiling_folder, scss_dir, css_dir, cache_dir, compiling_options, sourcemap_options, errors, enqueue, always_recompile). The keys you set override the saved settings. See the readme on GitHub for an example.
- Does this plugin support Compass?
Currently there isn’t a way to fully support compass with a php compiler. If you want limited support, you can manually import the compass framework. You’ll need both the _compass.scss and compass directory.
compass / frameworks / compass / stylesheets /@import ‘compass’;`Alternatively, you can include Bourbon in a similar fashion.
- Can I use .sass syntax with this Plugin?
This plugin will only work with .scss format.
- It’s not updating my css, what’s happening?
Do you have errors printing to the front end? If not, check the PHP error log (wp-content/debug.log when WP_DEBUG_LOG is enabled). The css will not be updated if there are errors in your sass file(s).
Make sure your directories are properly defined in the settings. Paths are defined from the root of the theme.
You can force a compile with the Compile Now button on the settings page. To compile from a deploy script, define WP_SCSS_COMPILE_KEY in wp-config.php and POST action=wpscss_compile&key=YOUR_KEY to wp-admin/admin-post.php.
- I’m having other issues and need help
If you are having issues with the plugin, create an issue on github, and we’ll do our best to help.
sandywp / also on the shelf
Try another plugin
WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code…
4.9 · 3M+ installs
Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditional logic, insert…
4.7 · 100K+ installs
Add Custom CSS to your WordPress site without any hassles.
Blocks Animation: CSS Animations for Gutenberg Blocks
4.8 · 90K+ installs
Add CSS animations and scroll effects to any Gutenberg block. Choose from fade, slide, zoom & more, with delay and duration…
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.