Quote of the Day: “Stay simple minded: Get a new battery; replace the bulb or fuse; see if the tank is empty; try turning the switch or just paint over it.”
- Handyman Tips
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)
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.
Free Advice for Today: “Become an expert at time management.”
- H. Jackson Brown, Jr.