Skip to main content.
Friday, July 15th, 2005

WordPress Upgrade

I have been getting help from two people now to try and learn how to post trackbacks, and in a quiet period the middle of it all I decided to upgrade my WordPress from 1.5 to 1.5.1.3.

I had seen some posts in the WordPress forums refering to trackback problems in 1.5, and the Codex came back up again yesterday, so I could read up on the upgrade procedure. I had seen statements that upgrading might solve my trackback problems, plus the last upgrade was a security upgrade. No one’s talking about what the security flaw is exactly, which to me makes it sound like it might be rather serious.

I tried taking my time preparing. I backed up my database and made sure my local copies of my online files were up to date. I had to go back to my copy of the original 1.5 files and compare the core files to mine, because I knew I had hacked some of them – I just couldn’t remember which and what I had done. I was also getting jumbled with the hacks I had made to my Mambo installations. It turned out that there were only two files and the hacks were purely cosmetic. I knew how reluctant to upgrade I had been because of the uncertainty about things like this, so I decided henceforth the keep better track. I went into dos and ran a file compare (fc) using the original and modified files and output the results into a text file, which I named with the original name and just added a “.hacks” extension. The fc output was very useful – here’s a sample:

Comparing files ...\wp-content\hacks\wp-admin\wp-admin.css.old
and ...\wp-admin\wp-admin.css
***** ...\wp-content\hacks\wp-admin\wp-admin.css.old
64: body, td {
65: font: 10pt Georgia, "Times New Roman", Times, serif;
66: }
***** ...\wp-admin\wp-admin.css
64: body, td {
65: font: 10pt verdana, helvetica, arial, sans-serif;
66: }
*****

Here you can see that I changed the fonts in the WordPress backend stylesheet to make it all the same font as my blog in the frontend. You can also see I got the line numbers and the lines before and after the changes. Cool! Can’t ask for better documentation. After the upgrade I was able to use these records to make the same changes to the new 1.5.1.3 files, and then I did the same thing – stashed away a copy of the original, unaltered file and an fc record of my changes.

So I realized that I needed to do a little digital housekeeping with my WordPress installation and think about my organization to make it easier to keep track of what I had already done and make upgrading a lot easier. For one, I’ve stashing image files all over the place. That had to stop. Then I decided that my template files were so modified that they were actually a new template. I gave them a new name and boy, did that pop up some errors! I fixed some broken filepaths to get my blog back up and running, but I’m going to have to go back and replace these filepaths with php and wp variables. Images associated with the template (anything in the header, sidebars or used to format appearance) go in the template images subfolder. Other images in my blog, such as photos or screenshots, go in a new images subfolder in wp-contents. Basically, anything that’s part of the blog must be in a blog subfolder, and unless it’s a working core file, it goes somewhere under the wp-contents folder. I can bend this rule a little with code under development – I have a development area in my website – but once the code is deployed it goes in the blog structure.

Somewhere in the middle of all this, I upgraded. I deleted all my WordPress files via FTP except my config file and the wp-contents folder and uploaded the new 1.5.1.3 files. Then I ran “upgrade”, which took less than a minute. The whole thing took less than ten minutes. I spent way more time preparing before and housekeeping after (and I still have some more to do) than I did upgrading, but next time things will be a piece of cake, and I should never hesitate about doing it.

So I was just finishing up yesterday when I got Web’s notice that he was opening up trackbacks on his Movable Type blog just for me. I threw out a Quicky Trackback Attempt, and guess what – it didn’t work (unless it’s held for moderation.) **Sigh**. And just before I started to upgrade, I threw in a trackback with my last post, and that did work!

Posted by Greg as My Website at 14:15 PST

2 Comments »