how I upgrade WordPress

September 9, 2008 · 17 comments

in general

I mentioned this morning on Twitter that it took me maybe 30 seconds to upgrade my blog to the latest WordPress release. I thought it might be handy to show how I do it. I’m not sure if this follows best practices, and it might be a good idea to back stuff up before upgrading, but this process has served me well for the last several versions, and it’s just so quick and painless that upgrading is trivial.

{ 2 trackbacks }

Beginner’s Guide to Wordpress SEO | SEO Domains
September 11, 2008 at 10:33 pm
I Will Follow | SEO Domains
September 11, 2008 at 10:34 pm

{ 15 comments… read them below or add one }

1 Alan Levine September 9, 2008 at 2:02 pm

Very cool and thanks for the walk through… I’m ready to become a command line junkie for the 6 WP sites I have at NMC.

Just curious- Do you do the plugin disable/enable game? Is that old Skool?

Reply

2 dnorman September 9, 2008 at 2:17 pm

the plugin disable/enable thing is probably best practices, but I figure the worst that will happen is a plugin will switch itself off. Too much hassle to do it manually – I run a bunch of plugins, and have several installed but not enabled. It’d be a pain to sort that out each time.

Reply

3 Chris Bell September 9, 2008 at 3:03 pm

Great walk through! So you’ve not had any plugin issues with the upgrades? That’s great if so :)

Reply

4 dnorman September 9, 2008 at 3:25 pm

I haven’t had any issues related to the upgrades. touch wood. so far so good. YMMV…

Reply

5 Alan Levine September 9, 2008 at 5:09 pm

Okay, I am a command line dork.

To avoid the confirmation prompts I had to do:

rm -f -R wp-content

which worked, but I cannot get the cp to work without it asking me to confirm every blasted file replacement. Tried:

cp -R –reply=no * /var/www/…./

but it asked me anyhow.

Sigh.

Reply

6 Chris L September 9, 2008 at 5:58 pm

Alan– you were on the right track-p cp can take the -f option too (and you can combine into one flag), so
rm -Rf wp-content
cp -Rf * /foo/

I never disable plugins either… I also never delete the wp-content directory, but then I never modify the stock stuff– all my plugins and themes are additions, so I just write the new wp-content over them (guess I have the absolute latest “hello dolly”plugin — nyah, nyah :)

Reply

7 dnorman September 9, 2008 at 7:48 pm

@alan I _always_ pause before running rm -Rf just in case I’ve mistyped the path. It’s WAY too easy to cause rapid, catastrophic data loss if you’re not really careful. That said, I do run it pretty regularly :-)

@chris I let the fancy schmancy new WP Plugin Updater feature keep Hello Dolly up to date for me :-)

One time, long long ago, I lost an edit I made to a default theme by overwriting the files. Now, I’m just paranoid – I’m not using any default themes, and plugins shouldn’t be a problem.

Actually, skipping the rm -Rf wp-content should be fine. maybe I’ll loosen up on the paranoia just a scootch…

Reply

8 dnorman September 9, 2008 at 7:51 pm

almost forgot – this basic process works just fine for Drupal and Moodle – just be careful to protect config files and user data files (wp-content in WordPress, sites in Drupal, etc…)

Reply

9 David Esrati September 9, 2008 at 8:49 pm

D’Arcy- thanks for posting- but, I find it easier to use a semi-WYSIWG FTP option- FireFTP, a plugin for Firefox.
I copy all the files over except for the wp-content folder and everything works fine too- without having to go all command line.

Reply

10 dnorman September 9, 2008 at 8:50 pm

@david – yeah, that works, but I find FTP waaaaaay toooooo slowwwwwww. Command line stuff takes a few seconds to do the whole deal…

Reply

11 Chris Bell September 10, 2008 at 10:03 am

i haven’t worked in command line for a long time, but i think it’s time to immerse myself back in it to save myself a lot of time.

Reply

12 Joseph September 10, 2008 at 11:52 am

Good sir, you are the man.

Reply

13 Kevin Jarrett September 10, 2008 at 12:16 pm

Command line? Eh?

Wordpress Automatic Plugin FTW!

http://tinyurl.com/yqtal3

Backups every step of the way, maintenance mode, plugin activation/reactivation…

Works for me…

-kj-

Reply

14 Private Krankenversicherung September 23, 2008 at 12:25 am

Excelent blog and comments. Thanks and best regards Private Krankenversicherung

Reply

15 Alan Levine September 23, 2008 at 12:51 am

Love the entry, hate D’Arcy’s influx of spam. Have a great life, “Private Krankenversicherung”

Reply

Leave a Comment

Previous post:

Next post: