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.

Comments

17 Responses to “how I upgrade WordPress”

  1. Alan Levine says:

    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?

  2. dnorman says:

    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.

  3. Chris Bell says:

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

  4. dnorman says:

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

  5. Alan Levine says:

    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.

  6. Chris L says:

    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 :)

  7. dnorman says:

    @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…

  8. dnorman says:

    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…)

  9. David Esrati says:

    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.

  10. dnorman says:

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

  11. Chris Bell says:

    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.

  12. Joseph says:

    Good sir, you are the man.

  13. 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-

  14. [...] how I upgrade WordPress [...]

  15. Excelent blog and comments. Thanks and best regards Private Krankenversicherung

  16. Alan Levine says:

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

Leave a Reply