Hello,
Chris posted this in the Pagespeed topic:
“Open style.css in a text editor, such as TextPad on Windows, BBEdit on Mac, or other pure “text editor” – notepad on windows works (NOT WordPad!!)
Go to http://cssminifier.com/
1) in your text editor, select all in the style.css file (CNTRL+A), and copy (right click copy, or CTRL+C)
2) paste into the left box on above website (right click paste or CTRL+V), click minify
3) copy all from right box
4) paste back into your style.css file on top (over/replace) — it should now look line one long string of code, not all the line breaks. This is what “minification” does; it removes spaces and line breaks (returns).
Optionally, make new text file called style.css and upload over the original (assuming you’ve made a backup). With a good text editor, you can also save with proper line breaks (for Unix servers, for example you should save stuff with “unix line breaks” and not “windows line breaks”) — hence something like TextPad 5 or BBEdit are good choices for this kind of stuff. Other freeware “programmer editor” software works, too.
This is how you manually minify the main style.css file. Must be done after every theme update; but literally takes less than 5 minutes.
You would need to replace the original style.css file either via FTP, or using a file manager in your hosting panel.”
I have 2 questions:
1. Will this also work for Newspaper (the entire pagespeed post?)
2. It says you need to replace the original style.css file – can I just replace the minification in the editor in wordpress?
Best,
Carly
Hi
all of my optimization sticky applies to both themes 🙂
If you have file editing enabled in WordPress then you should be able to select all and replace all in the style.css file from the editor — we have that capability disabled for security purposes, so I’ve not used that for at least 5 years or more —– so no idea ! Seems like it should work.
Benefit of replacing the original file, is you can via ftp, rename the main style.css to xstyle.css, upload your modified file; if site doesn’t work, you just rename the other file back and boom you’re back.
Doing it from the file editor may work, but generally your style.css file shouldn’t be “writable” for security purposes.
Awesome! I was able to write it over with wordpress, I just saved the original by copying and pasting into a text file, then tested out the minification to see if it worked – which it did. Thanks again!