I’ve seen a number of people tell others that WordPress 2.5 will have little to no database schema changes. It looks like that is no longer the case as MichaelH has pointed out.
Changes to database schema from Version 2.3 to 2.5.
*Table: comments
- Changed ‘comment_approved’ to varchar(20) NOT NULL default ‘1’
- Added KEY ‘comment_approved_date_gmt’ (comment_approved, comment_date_gmt)
- Added KEY ‘comment_date_gmt’ (comment_date_gmt)
*Table: links
- Changed ‘link_visible’ to varchar(20) NOT NULL default ‘Y’
*Table: options
- Changed ‘autoload’ to varchar(20) NOT NULL default ‘yes’
*Table: posts
- Changed ‘post_status’ to varchar(20) NOT NULL default ‘publish’
- Changed ‘comment_status’ to varchar(20) NOT NULL default ‘open’
- Changed ‘ping_status’ to varchar(20) NOT NULL default ‘open’
*Table: term_relationships
- Added ‘term_order’ int(11) NOT NULL default 0
Thanks to MichaelH for putting these changes together. This information is especially useful to plugin and theme authors as it lets them know if their particular project will break.
Thank you for the info! I was wondering about the differences in the database, and really like the way you’ve laid it out so clearly! đ [Easier to readabout things here than look through the schema me thinks :D]
Good info, thanks
This changes will affect the migration? :S. This worries me…
I already know 2.5 is gonna shut down my entire website. đ
Just a stupid question here from my side. My blog is still running wordpress v2.2. So when version 2.5 comes out, will I be able to safely upgrade to it or should I upgrade to 2.3 while it is available and then upgrade it to 2.5 when it is released.
Thanks for the hints, it’s time to look at the new WP đ
Does anyone know whether these DB changes will have to be done across the board? Or will these be only for versions 2.5 implemented blogs.
Um, like, not really. The changes are only for adding default values. Unless you are expecting something other than the default, then I wouldn’t think your plugin would break.
Were you looking for comment_approved = NULL? I think not. Most plugin authors won’t have to worry about the changes, because it will only reduce the amount of errors. Of course, if you are adding comments or links, you’re better off using the API.
I’m sure some of the above comments were being sarcastic.
I agree with Jacob, some of the sarcastic comments on this post might be worrying to unsuspecting users. These schema changes are for plugins authors to understand how the underlying database changed in WordPress 2.5 and will not affect the migration or shut down entire blogs.
As for upgrading from previous versions, there should be a clear upgrade path for most recent versions of WordPress. Plugins are the responsibilities of the individual developers and users should check the individual plugin pages for updates or when equipped with automatic upgrade, will be able to upgrade them from the admin console.
The database differences between 2.3 and 2.5 are relatively minor and won’t affect 99.9% of plugins. This isn’t like 2.2 vs 2.3.
Upgrade when it comes out guys, trust me. You’ll thank yourself and us plugin authors who are biting at the bit to be able to use all the new awesome functions will thank you too.
Um, like, not really. The changes are only for adding default values. Unless you are expecting something other than the default, then I wouldnât think your plugin would break.
Were you looking for comment_approved = NULL? I think not. Most plugin authors wonât have to worry about the changes, because it will only reduce the amount of errors. Of course, if you are adding comments or links, youâre better off using the API.
Iâm sure some of the above comments were being sarcastic.
Not one of the plugins I use has been complaining about 2.5RC1 anyway đ
A link to Michael would have been nice, to see where you’re getting these changes from.
Ok, I’ve linked to where I received the information from.
I’ve been working a bit with RC1 and, so long as plugin authors are using the API wherever possible, there shouldn’t be any breakage. That said, if there are any plugins that are directly calling the default WordPress database tables, a little bit of testing will be in order.
Hopefully the upgrade from earlier versions of WordPress will not greatly affect too many people. I’ve been working with a heavily modified 2.1 for some time, and I’d like to bring it up to the most current.
Thanks for the info. I was wondering why some of the plugins stopped on rc1.
Is this the full change list or just a “so far”?
That’s good info. I hope 2.5 will include a powerful upgrade engine, so as not to break my current blog customization.
Thanks for the hints, it is very useful for me.
I’d like if the DB changes would be planned *in advance* when a new release cycle starts, instead of finding out about them at the last minute (it doesn’t matter whether they’re minor or not… it’s a bad practice).
RE: Migration from 2.1x to 2.5? I never went beyond 2.1.x on my site because I was terrified of the migration of all my UTW tags to the new tag structure in later versions of WP. With all the new bells and whistles, I’m thinking about doing a fresh install of 2.5 when it comes out, then importing all of my content into a fresh install to make sure everything works. Will there be tools to help me transition all of my UTW tags (and associated linking structure) to the WordPress tag structure?
What’s my best move?
I would suggest setting up a test site (sub-domain or whatnot) and test the import routines with existing database backups. I’ve had a few issues importing one of my 2.1 databases into 2.5 without the hiccups and manual editing, but nothing that can’t be ironed out with a little patience. Once the data in your 2.5 test is set and ready to go, perhaps you could do an export and import to a newly updated 2.5. This would likely save you the most headache and reduce total site downtime.
Thanks for the tip. That sounds like the least risky path.
@technabob: Actually I had this issue when I was upgrading from 2.1 to 2.3 (not as drastic as 2.5 but still…) because I used UTW and although my site content wasn’t huge, it was definitely key to the traffic that came in and also with organising posts! I did do a test run between 2.1 and 2.3 on a local database before I did it on the main site, and actually it was surprisingly easy to convert the UTW tags over the to default WP ones. If I remember correctly, the tool was built in-to WP2.3 to help migration; perhaps the same thing will be there for 2.5.
I would hope that update could be put off for some time, where WP could carry two branches — 2.3 and 2.5 — for awhile before forcing everyone over. Otherwise, I think a lot of people will be crying when they try to upgrade.
lol are you serious?
Difference b/w the database table structure of old and new wordpress
Please asnwer