How to avoid doing what I did this morning
Filed in GeekinessWhat I did to my themes for Wordpress this morning could have been easily avoided by following two few simple rules.
- Do not program or fiddle with design live after only four hours of sleep.
- Do not program or fiddle with design live before you have had enough coffee.
Now that we’re clear on those points, we can move on.
If you are working live on a template, and you are not familiar enough with CSS to know what to do in your sleep, it is typically a good idea to save a spare copy of whatever you’re working on. For example, this morning, I should have first saved a copy of the stylesheet as style_orig.css. That way, when I somehow messed everything up, all I would have had to do is copy the style_orig document on top of the working copy, style,css, and I would not have had any worries.
It is also a good idea to re-save the file style_orig.css every time you complete a change that works. If I’d done that, I would not have had to redo all my font sizes and colors (which I still haven’t done–I’m brewing color codes in my mind).
I usually work in a browser with several tabs open. One tab is my Wordpress admin; one is the page I’m messing with. I can save a change to style.css, I can hit reload, and if things are messed up, I can quickly fix things before Auntie Jane sees it and goes, “Ew.”
It’s a really simple technique. Here it is again:
- Make a change to your template
- Save it
- Hit reload
- Backpedal to the last version or save new version, as appropriate.
If you are obsessive you can even save different versions of the original as you progress with a nice tasteful numbering system like style_copy_1.css, style_copy_2.css. This is helpful if you find something is wrong that you hadn’t immediately realized was wrong and already saved over the most recent copy.
What I did this morning: I saved a copy, all right. I saved it in the wrong directory and then uploaded the original style.css right on top of what I thought was a backed-up file. Yup. Thou shalt not work without coffee.
Also, it is highly recommended that you know about CSS to understand what you are changing and what is likely to go wrong. For example, I am now at a stage with PHP where I can figure out quickly what has gone wrong. With CSS, I’m not even close.
Subscription links
-
If you enjoyed this post, please consider subscribing to the Raven's Roads RSS feed! Click here for the raw feed or links to feed readers.







No Comments, Comment or Ping
Reply to “How to avoid doing what I did this morning”