Upgrading Wordpress
June 21, 2007 | Filed under: Tutorials
It’s no secret that we’re partial to WordPress around here. We use it for our own websites and for the majority of our client’s site. WordPress is so great because it’s so multi-faceted and can be used for so many types of projects, not just for blogs. Plus it’s free, which is always a big plus.
Another great thing about WP is how easy it is to use. One thing I’ve noticed though, is that many beginners are apprehensive about some of the basics of WordPress, like installing, upgrading, and adding themes and plugins. They think doing these things are difficult or complicated, but in fact they are REALLY easy to do. And as a WordPress user these are things you should know how to do yourself. Especially upgrading. Having the most recent version of WP installed is always the most secure option. Upgrading takes all of 5 minutes and not upgrading can open yourself to a world of pain if your site gets hacked.
The WP Codex is a great source for instructions on how to do these things, but I still get the same questions over and over, so I’m left to assume people don’t know it exists or they find the instructions in it dense or intimidating. I remember the very first time I tried to install WordPress years ago, following the codex instructions to a ‘T’ only to get waylaid when it told me I needed to set up a database. I remember thinking, “What the heck is a database?” I still get this question all the time from new clients, most don’t even know that WP runs on a database.
With that in mind, I’ve decided to do a series of tutorials for WP beginners. I’ll go through some basics as well as some important features and maybe some things you didn’t even know you could do with WordPress. Please feel free to comment and ask any WP related questions you have because I’ll be happy to answer them.
For my first tutorial, I’m starting with one of the most important things: upgrading WordPress. And wouldn’t you know, a new version of WP was just released today, so it’s the perfect time to learn.
Preparing for the Upgrade
First of all, you need to get yourself an FTP program. There are a TON of free ones out there and they work pretty much the same. There’s window with your local computer files and there’s a window with your server files. You transfer files between the two windows. Easy Peasy. I recommend SmartFTP. It’s free and it’s easy to use. But did you know that Internet Explorer has built in FTP? I still prefer SmartFTP, but if you already use IE, then this might be easier for you. Here’s instructions for FTPing in IE. Firefox also has a nice FTP client you can install if IE isn’t your thing.
Second of all, you need to back up your current site. VERY VERY VERY IMPORTANT. You should be backing up your site regularly (at least monthly) whether you’re upgrading your site or not. Don’t expect that your host does it for you (although they should), because if there was some kind of catastrophic server failure you could lose EVERYTHING and they would not be at fault (seriously, check the fine print). Most hosts provide a back up option in your website admin (cPanel, Plesk, etc). Swank Web Hosting uses cPanel (as do a majority of hosts). To back up your site in cPanel, login (the cpanel address is usually yourdomain.com/cpanel) and find the icon or link that says Backups. Yes, it really is that easy. Click the ‘Download a home directory Backup’ link and download to your computer. This could take a little while if you have a lot files and/or a slow connection. Then click on the database link(s) under “Download a MySQL Database Backup”. It’s super important that your have a backup of your database. This is where pretty much ALL of your WP info is stored: posts, comments, categories, links, options, users. The only things not stored in the database are your themes files, images and plugins (which is why you did the home directory back up as well). If something goes wrong then all you have to do is come back to this page and upload your backups in the ‘Restore a Home Directory Backup’ and ‘Restore a MySQL Database’ fields. Yes, it really is that easy! If your host doesn’t use cPanel and/or you can’t find the place to perform a backup, then contact them and ask where it is. If you host doesn’t give you this option, then it’s time to find a new host.
A Sidebar
There are really two kinds of WP upgrades. There is a version upgrade, which would be like going to 2.1 to 2.2 and there’s a security (or bug fix) upgrade, which would be 2.2 to 2.2.1. The upgrade they released today is the latter. A version upgrade can be more complicated because it usually introduces new files and features and there could be plugin/theme incompatibilities. A security upgrade is just fixing issues with certain files and it can only make WP work better, there is very little chance of a security upgrade messing up your blog. I’ll detail how I do both kinds of upgrades.
Starting the Upgrade
Download the newest version of WP, of course, and unzip it. They always announce new versions in the Dev Blog, which will show up in your WP dashboard or you can subscribe to it via RSS feed.
Connect to your server from your FTP of choice. Your host will have sent you the info you need:
Your FTP address - typically this is just ftp.yourdomain.com, though you may also connect directly though your IP Address.
FTP Username and Password - If you have cPanel this is usually the same login info.
Once you’re connected find the folder that your WP files are installed. This varies from host to host, but they are usually in a ‘public’ directory. For Swank Web Hosting customers and many others, the files will be inside ‘public_html’, but I’ve seen it called ‘public’, ‘http’, ‘www’ and ‘home’. Either way WP files are easy to spot. All WP folders are called wp-something and files are wp-something.php click on folders until you find them.
If your doing a security upgrade (2.2 to 2.2.1):
Upload all the files and folders to your server and overwrite the old files. If you do it this way, it overwrites any files that need to be updated, but if you have other files (theme files, plugins, images, etc.) it just leaves those alone.
A couple things to be careful of:
- If you’ve updated the default theme at all, DO NOT overwrite it with the new files. Theme files are located in wp-content/themes, before your upload, remove the themes folder completely.
-Never ever ever, overwrite wp-config.php. This connects your blog to your database. Leave this file alone.
Once all the files are overwritten, go to your browser of choice and put in:
http://yourdomain.com/wp-admin/upgrade.php
You should get a white screen that tells you that your database is being upgraded and to click on Next. Do what it says.
Annnndddd… your done. IT REALLY IS THAT EASY!
Log in to your admin and make sure everything seems to be working. It should be. There’s very little chance of plugin/theme incompatibilities between security updates. If you do have a problem, then it’s usually because it was a badly written plugin. The good thing about WP 2.2 is that it will automatically turn off any plugins that are causing problems (so you won’t get what I like to call the “white screen of death” anymore).
If your doing a version upgrade (2.1 to 2.2):
This is a slightly more complicated upgrade, but mostly because it involves extra precautions, not extra work.
Log into your wp-admin first and click on Plugins. Deactivate all your plugins. 2.2 has a handy ‘Deactivate all Plugins’ link, but for previous versions you’ll have to do it one by one.
Go to your FTP client, connect and find all your WP files on your server. DELETE wp-admin, wp-includes, and all wp-something.php files EXCEPT wp-config.php. DO NOT delete the wp-content folder. Also if you’ve made any other sorts of modifications to certain files or folders, it goes without saying that you shouldn’t delete those or overwrite them. But for the most part you shouldn’t have anything in your wp-admin or wp-includes folders that you made modifications to (and if you did you then you probably don’t need to read this tutorial).
Then upload all the new WP files. Again, you can overwrite your wp-content folder, but if you’ve made any modifications to the default theme, don’t overwrite it.
Then just follow the same instructions as above. After the upgrade is complete, log back into your admin and go back to Plugins. Activate them one at a time and make sure they aren’t causing any problems with your theme or admin area. If you get the ‘white screen of death’ then just go back to your FTP client and find the plugin you just activated (inside wp-content/plugins) and delete it.
People always freak out about this aspect and it seems to be one big deterrent to upgrading, but it shouldn’t be. If you are using well made, regularly updated plugins this really shouldn’t be much of an issue. I’ll talk about plugins in my next post and expand on this issue.
Now, I’m off to upgrade all my sites. You should do the same. I have 5+ wordpress sites and I can upgrade them all in about 10 minutes total. The more you do it, the more comfortable you’ll get and you have the added benefit of getting familiar with WP files and file structure which will help if you want to add themes or plugins in the future.
TAGS: blog, tips, tutorial, upgrade, WordPressRELATED POSTS:






recent del.icio.us links











Bubbila Says:
Sweet resource, just what I have been looking for.
On March 29th, 2008 at 4:04 pm