OK, So Here's The Deal...

A Marine Major, Running Fool, and All-Around Smart-Ass.

Thursday, August 18, 2005

I've Been Busy

OK folks, life conspired against me.

The damn worm virus infected our entire network at work so I have no internet at work.

Hence, my silence today

But before that happened this morning, last night, I decided to change my regular home-grown blog to Wordpress. If you don't know what that is, it's like my own version of blogger that I control. Last night I was up until almost midnight setting it up and configuring it.

Hence my silence all last night.

Tonight, I tried to figure out how I can import my old posts from a flat HTML file into Wordpress.

Hence the silence tonight.

Here is an update email of my progress to a friend who's helping me. Careful reading it, you might pull something.

----------------------------

OK, here's what's going on. I'm learning a lot.

I decided to run a test import for one month of blogs.

I cut and pasted the text from my November 1997 blog into a Word doc. Then I did some find and replace to make it look like MT format. It took me awhile because I was learning the format and had to come up with inventive find/replace combinations.

But I still and to go in every entry and fix the blog date tag and take out various lingering format problems. I made the title the long date format just to make things simple.

I then saved it as text and followed the directions to use a PhP script that came with WP to import it in.

And the entries didn't show up.

I logged into the database to find that the entries WERE there. (my space provider, POWWEB, not only offers one free SQL DB but they offer and online mySQLAdmin interface. Sweet! Never used it before but I learned quick. Those old DB classes in graduate school helped a little)

WTF?

I did some comparing of entries that DID show up and I noticed that the author field for the good ones had "1" and the ones I just imported had "2". So I ascertained that for some reason, WP will only post blogs by author = 1.

I changed one imported entry to author=1 and sure enough, it posted.

So now I had choices: do I try to fix this in the import.txt file somehow to have author always =1, or

fix it in the mySQLAdmin table, or

just go in each entry and change the author through Wordpress interface?

Or, I could try to get WP to allow publishing from authors 1 AND 2.

Trying to fix it in the import file was fruitless.

Fixing in the mySQLAdmin table was tedious and time consuming, as was changing the author through Wordpress interface. Plus, this would compound when I go to import years worth of entries so I didn't like it.

I couldn't get WP to publish multiple authors which really pisses me off because if they ALLOW multiple authors and users, they must have a setting to let them post. Otherwise, why have more than one allowed? But I couldn't find the setting no matter how hard I tried.

Every time I failed, I had to erase all the imported records (if you didn't, the script would claim you already imported it and would not update) and rerun the script. Again, very tedious.

Through trial and error, I finally figured out what the user name for author=1 was and did a final import. (It gave a pop up box to specify this but I was inadvertently putting the nickname instead of the user name so it thought it was another user.)

I refreshed the page and NONE of the entries showed. AGAIN.

This time, for some reason, it set the post_status to Null instead of "publish". So now I was in the same boat: where to fix this.

This could have been solved if I could figure out how to do a batch update on multiple records in mySQLAdmin (I know this is elementary but for the life of me, I couldn’t figure out how to do it and couldn't remember enough SQL to write the function). But it made me update record by record. Tedious.

So I broke down and went through every record and set it to "publish". I then had some issues with latency because it didn't look like it was working and then all of the sudden it did. I don’t know if there was a delay in changing the table and having the changes take. Whatever.

The last thing I noticed is that it replaced all quotation marks and apostrophes with question marks. I figure this is because they serve as code tags and in the text, they couldn't let them slide.

So that is about where I sit. The ?'s are about the only residual effect now.

I figure I can get down to 1/2 hour to an hour per month so with 6 years of blogs, we're talking about 72 working hours to get them all converted.

I don't know if it's worth it so if you have a better plan, I'd love to hear it.

Subscribe to Post Comments [Atom]

4 Comments:

  • At 10:37 PM, Blogger CoastingThroughTheSouth said…

    Sir,
    I'm so proud of you. You're finally using word press. I wish I could get a server up and running so I could use it again.

     
  • At 6:22 AM, Blogger Viper said…

    Yeah, yeah, but now I gotta figure out how to import old posts, comments, hyperlinks, ahhhhhhhh!!!

    POWWEB is only $7.77 per month and you get webspace, SQL database, hundreds of email accounts, etc.

    THIS IS NOT SPAM!!!!!!

     
  • At 10:14 AM, Blogger CoastingThroughTheSouth said…

    Sir,
    Would that then involve moving you entire webpage?
    I can't imagine that being fun.

     
  • At 3:25 PM, Blogger Viper said…

    Ryan,

    No, just the blogs. But still, I calculated it out and it will take about 72 working hours to get all the backlongs into Wordpress. And that's with using the import function.

    And no, it's not fun.

     

Post a Comment

<< Home