with Lorelle and Brent VanFossen

Successful Upgrade to WordPress 1.5.1.2

I should really trust the folks at WordPress a little more. After all, I work with many of them frequently during my week as a volunteer. When the news of the new releases (plus one security patch they leapt on immediately) came out, I thought “YIPPEEE!” Then I was so busy over the past two weeks, my race to upgrade became a procrastination issue.

The more I procrastinated the worse it got. Instead of joy and anticipation, I had time to think back to all those upgrades from hell. Like Windows XP Service Pack 2 which blew up my peer2peer file sharing and complicated a few other things. I survived it all, but for a few days it was very messy. Or earlier in my long computer history of upgrading all kinds of things that sometimes made life easier, but often meant searching for new printer drivers, graphics card drivers, and more. While there have been hundreds and maybe thousands of good upgrades, the few really bad ones started to rise up from my subconscious and the worries moved in.

What if it screws up the layout and plugins and everything that I’ve done to totally tweak my site to my needs and dreams? What if it totally borks and my site goes down? What if…well, you can imagine the worst case senarios because we have all been there.

Upgrading WordPress

Like I said, I should have trusted the folks at WordPress. They have an aweseome development team that worked overtime for this upgrade to fix over a hundred bugs and ickies. Within hours of finding a minor security flaw, they were on it and the download was updates, even before people started finding out about it. Jumped. They ran the beta testers through the ground on all kinds of machines and systems to make this be as solid as possible.

And indeed, it was a painless and fast upgrade and so far, everything is working wonderfully. And I thought I’d share my experience with the process.

These are the instructions provided on the forum, with my notes under each simple instruction, just to add my experience to the process and maybe help you avoid a couple little things I discovered along the way.

1. BACKUP your database
This was the only place where I ran into trouble. And the only part of the trouble wasn’t trouble but TIME. Following in the very clear instructions from the WordPress Codex article, Backing Up Your Database, I followed every instruction and went into PHPMyAdmin and backed up my WordPress database. It took only a few minutes and I learned that my database is about 8.7 megs in size. That’s huge, but then, I am nothing if not verbose. ;-)

I then went to my website and backed it up to my hard drive. Now, I learned something that really stunned me. Including photographs, graphics, and all of my old HTML web pages that still sit there for safe keeping right now, and the very few WordPress files that now run my website through the database, I have over 8000 files on my website. Most of those are photographs and graphics, but WOW! This all compressed down to 321 megs, but that is still a lot for a personal website.

And I have a reminder for myself and others who do this the “hard way”. Use an FTP program to copy over your website to your hard drive. I didn’t think about the actual size of the entire website, and the fact that I already had a couple of backup files stored there (which are not part of the size I just mentioned) that were about 200 megs each, and copying them to my hard drive using Windows Explorer’s FTP function sucked. It took me almost 4 hours. Next time, a dedicated FTP program. Windows Explorer thinks too hard before it does anything. UGH!

2. Download 1.5.1. Unzip it.
This was brainlessly easy – no stress there.
3. Open the unzipped folder, and DELETE wp-images. (You have no need for these in an upgrade)
The wp-images folder holds a few WordPress graphics and the folder for the smilies. I don’t use smilies on my site, so I certainly didn’t need these, and the rest of the graphics were dated from a much older install, so they aren’t new or necessary for the upgrade. Nice touch to add that detail, though you could add them and nothing would change.
4. Now open your ftp program and go to your blog directories.
This also was brainlessly easy and using SmartFTP allows me to actually do side-by-side comparisons of the WordPress folders on my hard drive and the same folders on my website. This helped with the next part a lot.
5. On the server, delete the directories wp-admin and wp-includes. Note: If you have “languages” directory in your wp-includes folder (with .mo files) you may want to save/backup those before deleting the wp-includes directory. Upload the new ones.
In the wp-admin folder, I found a few things that I shouldn’t delete, but I almost did. I sorted the list by date, which set all the files I’d changed since the last upgrade at the top of the list with newer dates. Glancing at them, I recognized a few plugin files and my favorite utility, Batch Categories. Yikes! I certainly don’t want to delete these. So I left them on the list and carefully checked each one, using SmartFTP to compare between the two lists, and deleted the ones that would be coming over from the new upgrade.

Now, a quick word about “deleting vs copying”. Not all FTP software works all the time. If you copy over a file, it sometimes copies everything, and other times, it just “kinda” copies over everything. This means you could have a file error or incomplete file. The reasons behind this are many, but trust me, having suffered through this many times, it is better to delete and replace than to copy over. Copying over may work for you this time, but until you have suffered the agony of trying to find the one bad file among the hundreds of files that you’ve just uploaded onto your site…you will delete and replace when it comes time for moving a lot of files to your site. These are good instructions.

6. The Classic and Default themes have been changed slightly so if you wish to, you can upload those to your wp-content folder.
I don’t use these, but sometimes I use elements of them on my site so I thought I should put the new versions in there, just in case. But more than that, I also do a lot of volunteer work for Codex and a lot of people base their WordPress Theme on these and having them in my folder to check the code helps me help them. So I deleted the old folders and uploaded the new so I would have the lastest versions of these Themes.
7. On the server and at blog root, delete the old WordPress files and upload new ones. I recommend you do this one by one if you are not sure. Do not delete wp-config.php.
I had to go carefully through this list, too, avoiding things that I didn’t want to go, and then making sure that wp-config was not deleted. This is the file that holds your configuration information so be sure and not delete it. If you do, get the original copy out of your backup and put it back in place. Otherwise, you have a mess. If you didn’t backup (SHAME!!!), then go to the installation instructions and use the supplied wp-config-sample.php and put all the information into it for your database, save it as wp-config.php and upload it to your WordPress root folder. It’s a time-waster, so save the fuss and don’t delete the file to begin with.
8. Now run “www.example.com/wp-admin/upgrade.php”
The nerves had really built up by now, having delayed this process WAY too long. I slapped the address into my browser’s address bar and hit ENTER, terror gripping me. I’d already deleted and replaced the files, and I could restore everything if it crashed…but still, the act of hitting the ENTER key was a serious life commitment.

Relief came a little when the “Are you ready to Upgrade?” screen came up. I clicked the “Get It Over With” (my name) button, shaking, and waited. It seemed to take forever, one of those moments like waiting for a child to be born, or the check to arrive in the mail, or the worst moment of your life: waiting for the rest of the sentence that follows, “We need to talk.”

Then came the screen that makes me sigh with recognition of familiarity and laugh at the lighthearted sense of humor the developers have. “That’s it. You thought there was more? You’re done. Have fun.” (my editorial version). I clicked the next link, which took me to my website, and everything looks great. I checked the plugins and they all seem to be working fine. It’s over!

After the WordPress Upgrade

Okay, I’m done. Well, at least I thought I was. I did make a few tweaks to my Administration configuration that have to be put back in. I went into the wp-admin/wp-admin.css file to manually change the height of the excerpt box, which is too small for my needs. I looked for the section that states:

#excerpt {
height: 1.8em;
width: 98%;
}

and changed it to:

#excerpt {
height: 5em;
width: 98%;
}

I’ll have to make sure that every one of the plugins that are hooked into the Administration area work, but so far, they all seem to be working great. And I’ll take the time to go through all of the Plugins I have to check for upgrades and do a little WordPress maintenance and housekeeping, but for the most part, the WordPress upgrade went smooth and perfect, and best of all, EASY. YEAH!!!

Post a Comment

Your email is kept private. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>