Shout out of the night: Nacin
This afternoon I did a terrible, terrible thing. I upgraded to WordPress 3.0.2 without backing up anything. There were two key things I did not realize. Which totally screwed me over:
- When editing your child themes in wp-admin (not via FTP, not locally), the directory on the right also lists files from the parent theme. When you edit those files (even if the child theme is selected in the dropdown), you’re really editing the parent theme files.
- When you upgrade to 3.0.2, the Twenty Ten theme reverts back to default settings.
What does this mean? I edited files from the parent theme, then deleted those changes when I upgraded. And because this was a project for work (not just leisurely fun), I panicked.
Thankfully, the second time around I was able to code everything much more quickly and efficiently, but I won’t make that mistake again thanks to WordPress core developer Andrew Nacin‘s latest commits:
When editing a child theme, there’s no way to know whether you’re editing a parent theme file or a child theme file. This could be disastrous, as you could later lose your changes on an update of Twenty Ten when you thought you were doing everything right.
A little warning just above the Save Changes button should be enough as a sanity check until we can more thoroughly overhaul the theme editor in potentially 3.2.


With 3.1, you’ll get a warning if you’re editing the parent theme of the current theme and you won’t even be able to access those files unless you manually select that theme from the dropdown (as shown in the screenshot above).
So thanks, Nacin, for rockin’ my Friday night.
This entry was posted in design and tagged andrew nacin, awesomesauce, whoops, wordpress. Bookmark the permalink.
6 Comments
You’re very welcome
I may have written it, but you’ve contributed directly to WordPress by suggesting just a few simple enhancements. Huge thanks for your awesome feedback. This wouldn’t have happened without you.
You should update to the latest beta, that way you can use your own contribution here on your blog!
Nacin
[...] very thoughtful post includes screenshots of what’s to [...]
I, er, um, did it, too.
@Ryan: Hopefully one thing that we’ll be able to do in WP 3.2 is recognize when you’ve edited a theme, and warn you before you update it. That will go hand-in-hand with built-in revisions, that way even if you do update it, you can roll it back, or potentially merge the changes. I’ve described some of the loftier goals in this blog post.
[...] Child Theme editor fix (Related trac ticket) [...]
[...] Child Theme Editor Fix (Related Trac Ticket) [...]