Many bloggers are upgrading versions in WordPress at the moment to 2.7 – so when Hendry Lee offered to write this guide to doing it I thought it’d be useful to many. Enjoy.
WordPress 2.7 codename “Coltrane” has been released earlier in December 2008, with the most significant change being the new Dashboard interface. A lot of people upgrade immediately, but a few others are still hesitant for one reason or another, as seen in the various blogging forums, including the WordPress Support Forums.
The rule of thumb is simple. You should upgrade as soon as time permits.
Not only because this version includes a bunch of new features and security updates, but also the fact that new versions will make future upgrades easier and painless with auto-upgrade and compatibility with newer versions of PHP and MySQL.
However, many people haven’t yet taken the time to upgrade because of a few concerns:
- Compatibility with installed theme and plugins. Most themes work out of the box with WordPress 2.7, with a few exception for themes that include custom queries to sticky posts and a few minor and easy-to-fix issue. (Well, if you are a theme developer who have access to a friend who are in the know, that would be quick to fix.)
- Lack of technical ability to upgrade. WordPress Codex includes a standard 3-step and extended upgrading processes. Even easier if your hosting includes cPanel, an upgrade is available through Fantastico — assuming that you install the previous version through it and your host has installed a new version of Fantastico.
- WordPress upgrades happen too often. Due to security issues and others, sometimes it is necessary to revise and update the code. If you resist upgrading to 2.7 because of this reason, there is a good news. This is perhaps the last upgrade you must do manually. The auto-upgrade feature makes the process easier after 2.7.
If you are more convenient with minor upgrade, you should at least make sure that you are running version 2.6.5 because it provides security updates for the latest release of WordPress.
However, it is important to remember that future upgrades will be harder if you are behind a few major releases. The development resources are now focusing on the 2.7 branch and future release (2.8), so if you want to enjoy new releases and features, upgrade is necessary.
How to Upgrade to WordPress 2.7 Directly
Upgrading a major release is better done through a step-by-step process. With a minor release, you can go from 2.6.2 to 2.6.5 without a problem, but with a major upgrade it is not recommended to go straight from 2.7 from 2.3, for example.
Most people upgraded from 2.6.x to WordPress 2.7 without a problem, but just to be on the safe side, you should check to make sure that your web hosting provider is compatible. As you notice, most popular hosting providers have already supported the new release.
Although it is worth mentioning that WordPress 2.7 still supports PHP4 at the moment, it may discontinue that at some point, mostly because PHP4 is no longer being updated.
If running particular theme and plugins are compulsory, check the 2.7 Plugin Compatibility and 2.7 Theme Compatibilitypages first before going through the upgrade process.
Finally, once you are ready, follow the steps in the WordPress Codex, either in the standard or extended upgrade page to proceed. The latter is preferable if you have used plugins beyond the ones that come with WordPress installation.
What If You’re Still Unsure
For bloggers and web publishers who use WordPress in busy sites, it is understandable when they hesitate to perform an upgrade because just a minor glitch usually means frustrating their users and losing revenue.
Certainly this is not desirable.
For people who customize WordPress heavily, the thought of losing all the hard work or have to do it all over again certainly hold them back.
If you can relate to one of the above situations, there are still ways you can upgrade confidently. The answer lies is testing.
While it involves more work, it also gives you peace of mind during the whole upgrade process. Remember as said earlier, this may be the last time you have to go through this process manually.
After you’ve gone through the whole thing, you may realize that even with the manual process, it is not as hard as you might imagine.
If nothing else, these upgrades allow you to create a testing platform for experimenting. If you are a theme developer or tester, or if you are developing WordPress plugins, you will be able to test them with a production-like environment with real data, complete plugins and your own theme.
Finally, in the worst case, you have to migrate your plugins or existing theme to make them compatible with WordPress 2.7 or disable the plugins until upgraded versions are available. But of course, you can choose to not upgrade if you want to make sure everything runs smoothly in 2.7 before you upgrade.
You can even speed up the process plugin migration process — but avoid pushing as the authors may do this for free — by encouraging the plugin developers to update their plugins. If enough people want the support, most likely it will happen, unless the developers don’t plan to continue the development again, for which you should start seeking an alternative or even take over the project.
Migrating to WordPress 2.7 Safely — The Plan
So, what’s the alternative plan(s) I am talking about?
It is a safe way to migrate your WordPress installation by making sure all of your plugins and installed theme work.
This method involves installing a separate copy of WordPress 2.7 in a test environment, load all the plugins and theme, including your blog posts and comments into it. Before you actually decide that the new version of WordPress works flawlessly for your site, you attempt your best to break it.
After all, it is better to find out if something breaks first during testing rather than having your visitors fall into it unintentionally.
Once you are happy with it, make the transition quickly. It is possible to do it without any down time at all. Well, perhaps a few seconds at most.
If that sounds too techie, perhaps you are true. I can’t change your perception but practically it is not hard at all. As long as you follow the steps below carefully, and you execute the plan only after you understand the whole process, you’d be surprised that you could do that too.
With a bit of background prepared, now it’s time for the exciting part.
1. Create a Copy of Your WordPress Installation
The good thing about open source software is that it is free. You can create a new WordPress blog in a few minutes, whenever and wherever you want it, with one of these scenarios:
- Install WordPress 2.7 in a directory under your existing blog. If your blog is hosted under example.com, it is possible to create another directory such as example.com/wp27 and make it as if it is another copy of example.com.
- Install WordPress 2.7 in a new domain. Just like the above scenario, but you can replicate the whole structure, even the directory under the domain, to match the main blog. Of course, the only difference in this backup blog is the domain name.
- Install WordPress 2.7 locally. There are a few ways to do this, either install it as a service running under your desktop operating system (Windows) using Apache or various alternative and lightweight web servers like nginx or lighttpd.
I’ve created an experimental WordPress virtual appliance called WP-Sandbox. It allows you to run a web server on a virtual machine quickly, using VMware Player. It is still in a very early stage of development. Currently, as of this writing, I have already spotted a few bugs so expect an upgrade soon.
Important: Rather than pointing the backup WordPress 2.7 installation to use existing database, you should backup your database and import it to a newly created database. If you have limited number of allowed database in your web hosting account, either install it locally or modify it to install in the same database but with a different prefix.
This upgrade of WordPress requires you to upgrade the database. By pointing it to a new / backup database, you avoid modifying the production data.
Don’t worry if you don’t understand what I’m talking about above. Just pick one that fits you well and go with it.
WP-DB-Backup is an excellent plugin for backing up a database. Follow the instructions at WordPress Codex for more alternatives, including using phpMyAdmin and straight MySQL commands.
Once you have the WordPress 2.7 code ready in the new location — including the edited configuration file (wp-config.php), export your existing data and import / restore it to the new database, you are ready for the next step.
I almost forget. Add the following lines to wp-config.php:
define('WP_HOME', 'http://example.com/wp27'); define('WP_SITEURL', 'http://example.com/wp27');
This saves you from modifying the database options.
2. Copy All Plugins and Active Theme
In this step, you are going to prepare the new WordPress 2.7 installation to resemble your existing blog as close as possible, but the most important things are plugins and theme. Copy the whole wp-content/plugins directory and your activated theme in wp-content/themes to the new WordPress directories, except that you don’t want to overwrite akismet and hello.php (the latter is just an example WordPress plugin showing random line of lyric from the song Hello, Dolly).
WordPress centralizes content in the wp-content directory. Unless you change the uploaded media to another place, it should be in wp-content/uploads. Duplicate the whole directory and sub-directories to your new WordPress if you can afford the disk space.
At this stage, you’ve already created an exact same copy of your WordPress blog, except that the backup blog is run under the shiny new version 2.7.
Unless you have other directories or files hosted under the domain in other directories, you are done with this step. It is recommended that you copy those complete directory structures over to the new blog. In the process, make sure you don’t overwrite any new WordPress core files.
You may also use your web hosting control panel to perform the duplication. FTP (or SFTP – secure ftp) is also common if you want to transfer files from remote (server) to local and vice versa. If you know basic Linux command line, you should be able to duplicate your data very quickly.
Note: Don’t forget the .htaccess, robots.txt, sitemap.xml, favicon.ico and other files as well.
3. Test, test and test
Now that you’ve created a complete backup of your blog in WordPress 2.7, now is the time to break it. I mean, do what you can to explore your blog just like a visitor would do. Pay attention to details and see if something breaks in 2.7 but not in the previous version of WordPress.
Ask a friend or colleague to test it for you, as others will often spot things that you fail to notice.
If you install various plug-ins that inject codes into your themes but are not visible on the screen, such as the meta keyword and description tags plugin, check to make sure they are all working properly.
Don’t rush through this process. Just because it looks well doesn’t mean there is no problem. Remember that at first most people didn’t want to upgrade because of the concern that it may not work for their blogs, so be a bit paranoid and test thoroughly.
4. Finalize installation on production server
After you’re satisfied with it, and most likely you will, you may want to do the upgrade process once again, but now targeting the production blog.
Here are some tips that let you minimize the down time. This method may not be suitable for everyone especially if your blog hosts a huge number of huge files but at the very least you can take some ideas and use them to make the migration process as smooth as possible.
- Extract or upload a copy of WordPress 2.7 to a new directory at the same level as the production blog. For instance, if your blog is at example.com/blog, extract a copy of WordPress 2.7 to example.com/wp27.
- Duplicate the whole data just like what you do in step 2 above. Use your favorite tool to do that, as long as it works for you. Most importantly, retain all the permissions of the files and directories so everything works after the migration process. Note that you don’t have to change the wp-config.php configuration variables like above because you want to upgrade your production database now. (You already have a backup copy of the database, right?)
- Double check if everything is already in place.
- Copy the directory of the production blog to something else, such as blog-2.6, and immediately after that, copy the wp27 directory to blog. If you are on Linux command line, you may do this on one line so it happens in a fraction of a second.
- Run the upgrade script, which is example.com/blog/wp-admin/upgrade.php, to continue with the above example. Follow the instructions on the screen and you are done.
Now perform extensive tests again on your production blog to make sure everything go smoothly.
If you have huge files that you don’t copy over from the old blog, now move them from the blog-2.6 directory to blog, which is now your WordPress 2.7 blog. WordPress 2.7 introduces a new contant NONCE_KEY in wp-config.php. For added security, you should complete all those keys if you haven’t. Replace the wp-config-sample.php to reflect your blog database and other parameters, and overwrite wp-config.php (backup first).
With the above method, notice that I didn’t take down the blog, put up maintenance message or use any plugin of that kind. Also if you have extra space to play with, this method is actually faster than replacing the WordPress files manually.
The second thing I want to bring up is that I didn’t deactivate any plugin at all. That process above works for me. If you want to ensure the process goes smoothly, follow the WordPress upgrade process (in the Codex, links above) to the letter and deactivate your plugins first before you upgrade. Note that you are responsible for your blog upgrade, even if you follow the steps above.
As of this writing, I just upgraded my blog at Blog Building University using this method. At the moment, I have 22 WordPress plugins installed on my blog. Not too many compared to others, but I’m impressed it works flawlessly.
The WordPress team is doing an awesome job there.
Enjoy your brand new WordPress 2.7!
(I remember a colleague from my last job seven years ago complained that I always leaved old files scattered. Perhaps he was right. You should clean up the old directory if you don’t need that anymore and delete the test database you’ve installed during the test.)
Hendry Lee helps bloggers overcome strategic and technological challenges in starting and growing their blogs. He is also an enthusiast about how to make money blogging and actively blogs in different niches. While you are there, download your free eBook and subscribe to the blogging e-course!
Follow Hendry on Twitter (@hendrylee).
Its a perfect article on upgrading your blog to wordpress 2.7. Its a cool version but problem is that my whole team had to learn and get addicted to this new version. :)
Worth a mention is the WP Automatic Upgrade plugin. If you have it installed, it takes just a few steps to upgrade to 2.7, and once the upgrade is complete, you can delete the plugin since the upgrading function is built into 2.7.
If you don’t have the plugin but want to upgrade, get the plugin to do the work for you.
From a user who has a site and portfolio dependent on several specific plugins to work – upgrading was a BREEZE and no plugins were affected.
That’s a very good tutorial for upgrading to 2.7 Hendry!
Cheers!
I have to say that I am not a WordPress expert — I’m a writer, not a programmer — but I didn’t think updating was as difficult or dangerous as you make it sound. Here I had no idea I was taking my site in my hands when on Christmas day I ran the plugin WordPress Automatic Upgrade and it walked me through the process, including backing up the files. It had already succeeded in taking my site from 2.6 to 2.65, so I wasn’t too worried, though perhaps I should have been! I hope you agree that this was a good plan and I wasn’t going in danger of blowing up my computer or at least my social media empire. Personally I would recommend the plugin highly. Agree or disagree?
I did not upgrade to WP 2.7 fearing there might be a problem! But this tutorial has helped me overcome my fears. I have decided to test it first by creating a dummy directory! Why did this idea not strike me before!
Concur with Leanne – Automatic Upgrade plugin (http://wordpress.org/extend/plugins/wordpress-automatic-upgrade/) is brilliant – which is why the functinality is now core in 2.7. Install it, upgrade, then delete it. Very easy.
I’ll second wh at Leanne and John said. Once you upgrade, you can (and should) remove the Automatic Upgrade plugin.
I agree with everyone above. The WP Automatic Upgrade plugin is an amazing tool.
I’ve been using it to upgrade my version for a very long time and have never had an issues.
Once I’d upgraded to 2.7, I deactivated and deleted it because it’s built right into 2.7.
Nice one @problogger.. its a great post on wordpress updates..
Nice article, but I must agree with Leanne here. Its so much easier to get the plugin to upgrade. The only problem I had with the upgrade is with my theme, its a pain in the butt.
-Ardit
Wow, I never realised upgrading could be so involved. If you’re hosted by Dreamhost they’ll do it all with the click of a button within about 10 minutes.
well, i upgraded to 2.7 the day after the release the standard way, and everything went just fine, i guess it’ll be the last ‘how to update safely’ guide as the next versions are all automatic updates, one of the main hassles(not such a big deal actually) with wp, gone!
One thing to look out for is speed.
Many people are finding the wordpress admin dash is mildly to excrutiatingly slow.
I have a snappy 2.6 and a completely fresh plugin free 2.7 on the same server. The 2.7 takes about 5-10 seconds for any page changes in the admin section. I’ve looked at the forums and they’re just a mess of server or plugin blaming and inscrutable debug info at this point.
So while it might look okay (i thought it was fine) once you go to use it might turn out not be.
Great timing Darren. I finally made the switch to 2.7 last night. I was incredibly nervous about the whole thing, but it went off without a hitch. I didn’t think to do an online test site first, but that is great advice.
Now time to get adjusted to the new layout…
Cheers,
Jeremiah
Thanks a lot for this artcile. I’ve been worrying a lot about upgrading to WordPress 2.7.
Nice article.
Testing the upgrade in a sandboxed ‘dev’ environment is a definite must before pushing out to production. It gives you a practice run of doing the upgrade, it helps spot any problems, and it makes sure you have a recent backup that you’re able to restore from!
Is it really necessary to go through such an extensive procedure to upgrade?
My suggestion is to just make a complete backup of your files and database and then perform the upgrade.
In case the upgrade fails, you can switch back to the previous version.
If you have one blog such a long procedure is fine. If you have more blogs… well, it is a painful task!
Very informative and detailed post – I actually used the WP automatic wordpress upgrade plugin and it worked like a charm – it backsup your database, and handles all of the upgrade task for you………
I’ve been pecking at my WordPress for weeks trying to upgrade it step by step. I’m just not tech savvy. I will try the WP Automatic Upgrade as my last ditch effort!
Thanks for this post.. I was looking for all these information, now I am happy that my search ended here.
I confess I was very apprehrensive about upgrading, but once I did it happened without a hitch. Back up your entries, theme(s) and disable your plugins… just in case.
OK, so the Automatic Upgrade Plugin didn’t work for me either (keep getting error messages) Is there anyway to pay someone to do this?? :)
Wow. Very good comprehensive guide.
I’ve upgraded all of my blogs already. I admit that I was a bit nervous at first, so I tested the 2.7 out on new installations and upgrades of new blogs. But all went off without a hitch, so I upgraded all blogs that I maintain. No problems yet, even with custom queries.
Thanks for the post. I have finally done my upgrade and I must say it was well worth it. I thankfully had no side effects appear.
Phew!!! I faced some problems when I upgraded from 2.5 to 2.7. But, as mentioned in this post, I took all the aforementioned precautions like backing up the database, following the instructions to the word and paying attention to what I am doing.
It took 2 hrs of my time to backup and install a new one, but it was worth the experience. Now I am running on 2.7.
Thanks for this comprehensive guide.
Carla, see wordpress.org for professionals who offer their help for free or for a fee.
I’ve tested automatic update plugin before. Generally it works great, but it may introduce another set of problem bloggers must address. Thanks for reporting your success with it. I believe that helps many problogger readers here as an alternative upgrade option.
Again, this post intends to ensure compatibility of your plugins and theme. And upgrading the code itself is just a small part of the process.
If I wanted to move my blog from Blogger to WordPress, is that a complicated process or even possible? Thanks.
Mike
Upgrading WordPress to the newest version is not always so simple.Many times has the upgrade made a few important plugins crash.I often wait a few months and when the new version is stable and there are plugins available I will install it.
ok – silly question – is this applicable for blogs on wp.com? or just wp.org.
thanks,
R
I have to say that this article makes the whole upgrading process sound like a nightmare and the not so technically minded could be forgiven for not doing so!
I also have to agree with Leanne and recommend the WP Automatic Upgrade plugin. I have this installed on several blogs and it has been used quite a few times without an error ever occurring, but I must admit to being nervous each time I use it. The good thing about the plugin is it will provide you with a backup of the database and files from the current installation for you to download as it reaches each stage of the upgrade process.
As mentioned earlier, this should be the last time this type of upgrade is required due to the function now being part of the system.
I love the new version, but after upgrading my FeedBurner RSS feed stopped working! Any advice?
Thanks for this. Definitely a great post for people upgrading the WordPress 2.7.
@Robyn, only for standalone WP installation. WP.com upgrades the code automatically for you.
@Tom, migrating from Blogger.com to WordPress usually is straightforward. I’ve done it several times before without a problem. Your experience might be different thought.
@Stephen, I partially agree. Upgrade should be simple and straightforward but in some cases it doesn’t go as smooth as everyone expects. And for large site, choking is not an option so perhaps this is worth it.
The automatic upgrade plugin doesn’t take the plugin and theme compatibility tests into account… besides that, I am really not against automatic upgrades.
Thanx for this timely post, Darren!
I’ve been one of those people that hasn’t been anxious to upgrade to v2.7 because of all the upgrades in a short period of time and the breaking of alot of plugins & themes I need to use.
I don’t need or want many of new features in newer releases of WP. But I understand security concerns. Just wish that WP would first concentrate MORE on the security issues than new features and then there probably wouldn’t have to be more frequent updates.
Thanx again for the post. It’ll be useful when I fnally get around to the upgrade! LOL
Rick Wilson aka CorpRebel 8)
Thanks to those of you that recommended the WP Automatic Upgrade Plug In. Prior to this post I was on WP 2.3 and since I had someone else set it up for me originally, I was terrified to try to upgrade it myself, or even install a plug in. Last night I installed the plug in, and a few others as well, and was able to upgrade to WP 2.7!
With infinite gratitude,
Marta Costa
2.7 is great but still has problems. Well, at least for me. For example inputting images through the button in the post doesn’t work so I have to do it manually.
I’ve been very skeptical and leery of upgrading. Thank you for the great article!
Christy
I upgraded with the automatic plug-in and had it done in about 20 minutes.
I usually wait until there is another minor release (2.7.1) but in this case the blog was a work in progress anyway.
Can’t say the new dashboard is doing much for me, but haven’t done any customization yet.
Yeah, I’ve upgraded to 2.7 but I’m finding some problems. For example, the WordPress.com Stats Plugin isn’t working. Anyone found a way around that?
thanks! this is just the article i was looking for!
julie
I know a much easier and faster way of upgrading. Install the automatic wordpress upgrade plugin and then use it to update to 2.7. Then uninstall the plugin. You will be up and running in minutes and I already did this with two blogs successfully with no problems.
Darren, thank you for this post/article. This is so helpful although as of now, I am still using the automatic wordpress upgrade plugin.
Very nice post on the detailed strategy to install WordPress 2.7. It was when I decided to move to 2.7, I understood that the famous 5-minute WordPress installs doesn’t work for updates!! :(
I’m finding Word Press 2.7 to be very comfortable to use. It was a fairly easy process upgrading. The dashboard is very similar, but slightly improved.
I’d backup all files before the change.
I wish this article had been written about 2 weeks earlier. I had a bad experience with my upgrade. I have since recovered and I love 2.7. Definetly backup before upgrading.
Here were my steps:
be sure to deactivate all of your plugins and make sure you have time to do this.
1) make back up – i didn’t do this
2) open up the config.php database and password to the new config-sample.php on WP 2.7
2.5)change the config sample.php to config.php
3) delete everything on server that has word press EXCEPT FOR THE CONTENT FOLDER. (this has all your templates and plugins)
4) Upload everything from 2.7 onto your server EXCEPT FOR THE CONTENT FOLDER
5)go into the content folder on 2.7 and upload the index file.
This is what I did. And it worked out fine. I had only one plugin that messed everything up and that was RB internal links but I just saw an upgrade so I assume that that one is all ready fixed.
Personnally, I have a free hosting blog on wordpress platform to act as a staging environment, like in every IT business.
So, for any changes I’ve to make on my website (styles, content etc..) I do this on my test site first and if everything is ok, I can apply same changes on my Website without any – or less – risk.
It’s quite simple, just a little bit of time, but it can prevent some unwanted downtime = lost of traffic = lost of money.
Definate confidence builder, but I’m not ready to create any headaches just yet for myself. I’ve already downloaded Coltrane and created a new blog with it just to get familiar with the interface, but upgrading my main blog? Heh. That’s when the old “if it ain’t broke don’t fix it”, cliche comes into mind.
I’m thoroughly impressed by the speed and navigation quickness of Coltrane. The auto-update is one feature that has me debating when I’m going to inflict pain on myself by upgrading and finding out some theme issue that will have me up into the wee hours of the morning trying to correct…
Great Post Though. Much needed information.
Thanks for the arcticle. I too am upgrading to wordpress 2.7 soon and this is just what i was looking for.
worked perfectly.
thank you!
Darren.