What safeguards do you use before editing CSS on a live WordPress site?
I’m curious how other WordPress developers handle this.
Editing CSS directly on a live site is one of those things most of us know we probably shouldn’t do, but sometimes it is still the fastest way to make a small fix. The problem is that a missing bracket, an overly broad selector, or one bad line can affect far more of the site than expected.
There are plenty of ways to recover afterward: backups, revisions, staging sites, version control, hosting snapshots, and so on. But I’m more interested in what people do before saving the change.
Do you always work locally or on staging first? Do you rely on Git? Keep a copy of the previous stylesheet open? Use a CSS validator? Or do you mostly make the change carefully and trust that backups are there if something goes wrong?
I recently started thinking more seriously about this after making one of those “small” CSS changes that caused a much larger problem than intended. I admit it, sometimes the easiest path is the one I'll take, even if it's not the safest path, so the temptation to edit css into a live site is often very tempting for me.
I’d be interested to hear what safeguards other people use (or if they're brave enough to admit sometimes they'll fly by the seat of their pants as well), especially when staging is not available and a live edit really does need to happen.

Replies