Today I spent a lot of time looking at different plugins and code and even found some fun WordPress drama. Happily I added some code to my functions.php and fucked up my related posts majorly bad. That means I have to fix it. I like that. I like fixing my code.
So, while I was out and about I paid attention to some things on various WordPress powered blogs. I looked at their design, of course, and their functionality. Then I looked at their source code so I could suss out what kinds of plugins they might be using. I’ll confess: I’m not very good at that part1. I love Chrome’s “inspect element” function, but even this poor browser seems to get all kinds of wonky when I open way too many tabs2.
Anyway, I ran across a couple of sites that were just way bogged down. I mean one even managed to hang Firefox, with only one tab open. I was like “WTF?” But Firefox has been acting really shitty lately, so I’m chalking that experience up to that. Ok, I lied. I’m not. It stalled Chrome too. I was going to tell the blog owner, but then I got over it. Who the fuck am I? I mean, they might want their front page link to single post comments to be broken and way too many external scripts to try to load at the same time. I will advise here, though, that I know from experience that sometimes there really are too many plugins. Especially if there’s one that has even a single line of fucked up junk stuck in the code.
Ok, that’s my bit o’ wisdom for today. I’m working on getting a new theme up here and possibly working on a portfolio site3. I found out today that WP-Footnotes has been taken over and an updated version was finally added to the Codex sometime last summer. I almost lost my mind when I saw that. As I said on Twitter, I love that plugin. It’s my favorite. I’ve been using it forever and a couple of days. I think Live Comment Preview is the only plugin that I’ve been running longer. I’m addicted to footnotes, what can I say?
What? You didn’t notice?4
I did leave a comment to someone else that they should consider installing both the Footnotes and the Live Comment Preview (though LCP looks a lot better without the Gravatars enabled) because they are so bomb-diggity. Especially if you’re going to manually add footnotes5 The comment preview is cool and it’s use is apparent for most people. I had the WP-Edit Comments thing for a while, but between that Nicole chick6 and SouthJersey PUMA coming in with their drive-by/editing nonsense I had to disable that bad boy. It seems buggy on all the other blogs on which I’ve encountered it anyway.
Then I found out about Jetpack.me. It’s newly released and is absolutely fabulous. I already had most of the plugins that come bundled in it7, so I just replaced them with Jetpack. Hellz yeah. I could’ve used the ShortCode Embeds thing before, though. Like when I was busily fucking up my links and archives pages. Yes, I liked fixing them8, but c’mon! This would have been cake had I had that plugin. You probably won’t see the Twitter widget here, though. Sometimes I get Ambien drunk and then tweet and, man, that gets ugly.
Kelly asked me if I liked the “After the Deadline” feature of Jetpack. At the time I couldn’t answer. I hadn’t tried it. But I just did.
I like it. It, of course, underlines all my little idioms that I like so well. Then you click on the red line and a little box pops up to offer suggestions on how to fix your errors. While you’re doing that, you’re unable to change the text9. When you can select an option or hit the “edit text” button and go back to your work. It’s nice. I suggest to Kelly (and whoever else) to go ahead and install the Jetpack.
I should probably get around to fixing my own shit now. I need to figure out why my uploaded images are all wonky and that related posts issue isn’t just going to go away. I was having fun today though and I’ve only got until Monday for all the messing around I can handle. I just need to stop getting so damned distracted by every damned thing.
By the way, it was raining all day today and then we went under a flash flood warning. Not an hour later it started snowing and now we’re under a winter storm warning. Ohio weather is definitely never boring.
- I just like to pretend I like code. Woo hoo! [↩]
- You’d think I’d stop doing that, right? Pshaw. [↩]
- I have nothing to put there. I just really want to play with some jQuery. [↩]
- Apparently you haven’t noticed them on my whole front page and every single post for the last few years. I’m just sayin’. [↩]
- Which is a huge pain in the ass if you’re using inline links. [↩]
- Copyright thing [↩]
- And for some reason it touts shortlinks as a feature, but I have shortlinks on my 3.1 install. I don’t get it. [↩]
- Because I had to learn how to fix them. [↩]
- I can see me fucking that up. Big thanks to Automattic for not letting me mess up my posts. [↩]









It’s Always Something
Helloooooo. Didja miss me?
I don’t know if you noticed yesterday, but my site was down. Like all day. I was having some serious issues. Someone at some time found an old, unused directory of mine and somehow put some code in that bad boy– which generated over 800 pages of bullshit spam.
Here’s what happened:
I went into Google Webmasters1 and was checking out my links. I’d seen a site that offered to tell me how much I’d get if I sold this site and, well, those are always fun. Then that prompted me to check back into my Webmasters panel for the first time in a long time. Anyway, I’m looking over the stats and see some crazy fucking keywords. Google thinks I talk about banks and loans and mortgages? What the fuck? So then I look around the panel. I found a shitload of internal links going to an old directory2. I go into the directory and delete the file that I thought was the issue. You know, the only file in the directory.
Don’t you know that file regenerated? ARGH! So, I go in and change the code in it, then change the name of the parent directory3. I go back in to see if the piece of shit re-regenerated and fuck me. All those files that were previously hidden from view were right there. Oh my god, there were so many of them. Select all-> delete. Then I waited and all was still gone. But wait! What if there was hidden code in another file? That’s a lot of flippin’ files.
Damn it!
I go into my phpAdmin and export my data. Except I didn’t want to export some plugin data so I uncheck it. Apparently, I also unchecked the comments, but not the comment meta data. *ahem* Oops. Anyway, I dump the database. All gone. Buh-bye, Fab Jinxed, and any bad files hidden therein. Zapped it all. As you can see, I did have backup files of the important stuff4. I didn’t save any plugins or any of the old themes, though. I happily deleted all that shit. The entire time I was wishing burning, dripping gonorrhea in that spammer’s eye.
So, I get a new install of WP and put that bad boy up. Then I go to import all the data. Damn me, I exported it in .sql format. Much hair pulling and wailing did commence. I kept getting freaking errors. Dur. Of course, they did. Because I was trying to create tables that were already there. But I wasn’t really sure what I should delete or leave or whatever. And then would WP recreate them or would that fuck up the install too? I tried a bunch of different things and then about gave up. By this time I had to get ready to go for a meeting with my new boss5 so I had to put it aside for a while. Came home in a fantabulous mood and then it hit me. The solution!
How to Import WordPress When You Messed Up and Exported a .sql file
I don’t know if this was the easiest solution, but it just popped in my head and when solutions do that– to me — that means I need to hurry up and solve that damned problem.
I created another database, imported all the tables, then one by one I moved the tables over. I deleted the tables I needed to replace in my WP database, then when into my “I so messed up” database and over they went. For those that might want an better solution than that: check a single table (wp-posts, for instance), then go into the “Operations” tab. Click “copy” data (or whatever it’s called– I can’t remember), make sure you pick “from [the current database] to [the WP one]“. Hit the go button and you’re all set! Do that for each table. Again I’m sure there’s a much easier way to do that, but this is what I managed to figure out.
There’s no help for the comments, though. They’re all gone now. Into the nether. Awww… Don’t worry, you can see how many people have commented on each post because I didn’t forget the comment meta data.
Oh! You know what else I didn’t copy over? My post and sidebar image files. Yup, just deleted them willy-nilly. Luckily for me I had a really old backup– Google cache. Hallelujah! *Doin’ a happy dance…shakin’ my butt.* Everything’s ready to go.
So, now I’m in the process of having Google take all of those files out of their index. And I reported the motherfucker that was getting paid off those links. Piece of shit had all those pages linking to each other and then had each one linking to his site– which was set up like the ones that Matt Cutts hates so bad. A bunch of crap thrown together– literally, none of it made any damned sense– and surrounded it with Google Ads. I reported it for two reasons: 1) Fuck that asshole little pubic louse and 2.) I wasn’t the only one who had hidden sites pointing to him. I checked. I’m going to be writing emails tomorrow, I think. Or not. Google will probably email them or something. Why should they believe me?
I don’t know how these buttholes got in, but I have a really good idea. And I’ll be keeping a better eye on that. I can’t believe I missed 800+ pages. What the fuck? I don’t know how long they were there, but now they’re far away.
Anyway, then I decided to play some more with MySQL. I have a local install on an external hard drive, thank you so much Xampp. I was inserting tables, editing data and trying to decipher the manual6. I get all excited when I do something that is pretty basic, but which I was too afraid to do before. So, yeah, technically I was working on a site today– it just wasn’t my theme. I did fix the pagination on the index page. That’s something, right?