What is the best approach (steps) to update WordPress when I have to update all of the following:
- wp core
- plugins
- 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
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:
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.
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.