Woah, retro!

I was contacted by someone with an innocent WordPress question, and in the confusion of email (“I don’t have that option”) it became apparent this person was running a older version of WordPress. I quickly thought migrating it would not be all that complex…

Till I started. Her site is in WordPress 2.6, and my first reaction on logging into the admin panel was

woah

Actually getting there was a bit of a jump. The person who set up the site had only given her Editor level access, and the admin WordPress login did not work. But I did get access to the cpanel. Here’s a little end around I have used before.

On my own blog I created an account with a password I want to use on the new site. I then go into the phpMyAdmin, dive into wp-users, find the row for the new user I create, and I copy the giant lons string of alpha-numerics for the password (it’s hashed, or encoded form the actual password).

I then go to the database for the site I want to bust into, and find the admin user name in the wp-users table. I first copy the current password (so I can clean up after myself), and update with the known.hashed password.

Now I can log into the site I need to explore with a password I know.

I researched a bit on the upgrade process, and no one suggested going from 2.6 right to 3.1. The recommended paths were like 2.6 – 2.7 – 2.9 -3.1…

I started making appropriate backups (database, theme, upload directories). I deleted the core files, and uploaded the 2.8 versions. Bork. PHP errors. Sigh. Not wanting to trash the site, and already 75 minutes in, I reverted all the content.

My new angle, which seems to have worked, was to use the Manage -> Export tool in the old site to generate an XML dump of the content (well actually I got an HTML file because it too had PHP errors, so I had to do some manual edits of the dump file to get a clean XML one).

I then installed a fresh copy of modern WordPress at a new URL. I was able to import al the content– well that took a few swipes. It choked twice, and I started chopping the XML file fo posts that had gotten in. It went much better when I told it to skip attachments (all the media seemed to connect in the old blog directory).

So now I give my client a chance to see if the new site is better- even in the stock Twenty Eleven theme it is way better, not to mention how much more flexible life is with menus and widgets.

If it flies, the switch back is not too tricky. I have to do a bit od directory named swaps, and a few edits to the wp_options table to get the blog urls right.

But the export/import route seemed to short cut a long upgrade path.

I’m not out of the woods yet, but am a lot closer than I was last night.

And out of those blue admin panes.

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *