Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What is the best approach (steps) to update Wordpress when I have to update all of the following:

  1. wp core
  2. plugins
  3. database

I came across this post http://codex.wordpress.org/Updating_WordPress However, it doesn't involve db update on top of wp core.

Should I update the db after wp code and plugins or before? Db contains settings for plugins, so I'm a bit confused when it's the best to update it.

Would really appreciate any tips.

Thank you, Dasha

share|improve this question
    
What database update exactly do you mean? Of WP core? Of some plugin? –  Rarst Jan 22 '11 at 13:12
    
Well I've added lots of information (pages, posts, metadata) as well as set up new plugins. So I was thinking the update the whole db. –  dashaluna Jan 22 '11 at 13:42
add comment

2 Answers

Any database changes WP itself needs are performed automatically. On first load after core update you will get (if required) special page that will say that database update is required and perform that update. No actions required from you really.

Changes and updates to database by plugins can vary and not many plugins actually need or perform them. If you perform plugin updates manually it's recommended to disable them, updating plugins inside WordPress will do that for you automatically if I remember right.

All data is supposed to be retained on updates. It is still recommended to make backup before updates (I usually skip it, but only because I have solid scheduled backups anyway).

Overall if updating grossly outdated installation I'd go with following:

  1. Perform full backup of both files and database.
  2. Deactivate all plugins.
  3. Update WordPress core, let it run database update.
  4. Update all plugins.
  5. Re-activate plugins one by one.

If there are some old plugins, critical to site's operation, it might be better to first copy site to local WP installation and test both upgrade process and operation of plugins with new WP version.

share|improve this answer
    
I would add another intermediate step(s) which is update by increments of major releases one by one , activating and after each step ,especially if the core is < 2.7 . ( for example 2.5->2.7->2.9->3.0.4->3.5->3.6->latest ).this is due to changes in wp-config (SALT) and update mechanism itself. also, different langauages might need different sequence –  krembo99 Feb 19 at 3:23
add comment

WordPress has a feature built into it to do updates and upgrades. Are you currently using an older version of WordPress that doesn't have this feature?

As Rarst wrote, you don't need to worry about the database updates. Both WordPress and plugins will upgrade the database entries and schema automatically, when you first load the administrative console after updating the code. (But, do back up your database before you start the upgrade process. WP-DB-Backup is a nice plugin that makes this easy: http://wordpress.org/extend/plugins/wp-db-backup/.)

If you are making a major upgrade, say from a version of WordPress before 2.5 to the current release, then you definitely want to turn off your plugins before doing the upgrade, and re-activate them one-by-one. But if you're just upgrading from 2.9 to 3.0, that's probably unnecessary. I would simply update the plugins first, to get the most compatible versions, and then upgrade WordPress.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.