I was taking photos of Zoe in the backyard, and when she noticed, she ran over to the chair and struck this little pose. She held it long enough for me to snap a single shot, and then ran over, demanding to see the photo. Her reaction was “I so pretty!”
Monthly Archives: October 2009
How to Convert Your Old WordPress Database to UTF8
When I upgraded my WordPress installation recently, I ran into a chracter encoding problem. Long story short, it turns out that older WordPress installations like mine tend to have been created in latin1, but the data is actually being saved in UTF8. If you update your wp-config file to a newer version, it adds a DB_CHARSET option, which will cause your site to puke, because the database character set doesn’t match the data that’s actually stored in it.
Thankfully, the fix is relatively simple, if a bit of a hassle:
- From your command line, use the
mysqldumpcommand to export your database inlatin1format. Since MySQL sees your database is already inlatin1format, it won’t re-encode it (which would break theUTF8data in the database). The command should look something like this:mysqldump -u username -p --add-drop-table --default-character-set=latin1 databasename > databasename.sql
Note: You must do this from the command line, because PHPMyAdmin doesn’t allow you to specify the characterset of the export file, so you will end up with re-encoded data, that will get scrambled and kill your database.
- Copy that dump file somewhere safe for a backup, in case something goes wrong.
- Using a text editor, open the MySQL dump file and replace all instances of
latin1withutf8. There should be one reference in eachCREATE TABLEline. - Import the database over the top of your existing one. Since you did a complete dump, with the
add-drop-tableoption, this will drop all your existing tables, and recreate them. And since you changed the character sets, this will effectively update your database toUTF8. The command will look something like this:mysql -u username -p databasename < databasename.sql
Now, if you’re anything like me, those instructions are terrifying. But trust me that there is relatively little risk. The very first thing you’re going to do is make a backup. If anything goes wrong, the worst case scenario is that you restore your backup, and you’re back to square one. I can’t tell you that it’s totally safe, but I can assure you that I did this to two of my databases, and it went off without a hitch.
Zoe Sleeps in a Toddler Bed
This is old news by now, because I’m a lazy parent-blogger, but Zoe has (long-since) given up her crib and moved into a toddler bed. We bought her a very nice bed for her second birthday, and she loves sleeping in it.
Most nights, bedtime involves one parent (usually Annie) handling bath, teeth, and reading books, and then the other (usually myself) handling lights-out. I offer her an option every night to curl up in bed or have me hold her while she falls asleep, and it’s pretty much 50/50 which one she chooses. She’s happy to lie in her bed, listening to the Garden State soundtrack, but if I try to sneak out before she’s all the way asleep, she’ll call me back, saying “No, Papa NOT leave.”
She’s usually asleep within a half-hour, and then sleeps in her bed for anywhere from 2-6 hours, at which point she wakes up, and Annie brings her to bed with us. More and more, she tending to sleep through the night, but she’s only ever spent the entire night in her room once so far.
Administrative Note
I’ve split this site into two, a personal one and a professional one. Spaceninja.com will remain my professional blog, with an emphasis on front-end web production. I’ve set up a new blog on ScottVandehey.com that I will be using for more personal posts about Zoe and non-web-development topics. Thanks for your patience.
The Post That Will Mortify Zoe When She Grows Up
These are the details that she’ll kill me for sharing when she grows up, but I don’t want to forget them, so apologies to future Zoe (and future me!)
Zoe is totally potty-trained now, and it was suspiciously easy. To the point where I’m half convinced that we’ll wake up one morning to discover it was all a dream, or a cruel trick someone played on us. Basically, we just made sure the potty was available, and chatted it up, but didn’t pressure her. Before we knew it, she was all about going potty BY HERSELF. Toddlers love any taste of independence, and once she figured out that she could sit on the potty instead of being put on a table and changed, she was all over it.
Of course, with that came the fascination with everything potty-related. She loves Everybody Poops, of course, but more than that, she wants to be involved when we go potty. It makes sense, right? We’re there when she goes potty, why wouldn’t she be there when we do?
So with that comes many discussions about gender, body parts, and bodily functions. And, like most toddlers, the way she absorbs new information is to talk about it — endlessly. Which means that things sometimes pop up in unrelated conversations. Which is why the other day, I was informed that I was a “pretty nice guy” and that I had made a “fancy poop.”
Lucky for Zoe, her cousin Milo is almost the same age as her. During a recent visit, they were both going potty (Potty Party!) and talking with each other about it, and I heard the following exchange from the next room:
Milo: Zoe, Do you have a penis?
Zoe: No, I have a NOT-Penis! I have ‘GINA!

