[wp-hackers] How common are table changes for WP?

Andrew Nacin wp at andrewnacin.com
Thu Nov 18 04:39:31 UTC 2010


On Wed, Nov 17, 2010 at 10:51 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:

> Does the database structure stay fairly constant from version to version?
> How common is there a structure change, and how often is that change major?
>
> The reason why I am asking is that I am writing an API to allow access to
> my
> wordpress posts.  To keep it lightweight I don't want to go load wordpress
> but rather just query the database directly.  The downside to this
> obviously
> I have to redo my queries if the wordpress table structure changes, hence
> the question how common are such changes.


We take no responsibility for scripts breaking that decline to use the API.
:-)

On occasion we will add, alter or remove fields and indexes. (Most common
would be adding an index or altering a field.) We recently added the
wp_commentmeta table, in 2.9. I would not be surprised if links become a
post type and we drop wp_links soon. But we're not in the business of
reshuffling the entire schema. Your scripts are probably rather safe
considering that large-scale migrations on sites like WP.com are just a lot
to stomach. We actually avoided making a single schema change in 3.1, which
was a conscious effort.

You can find a history of changes on this page:
codex.wordpress.org/Database_Description.

Nacin


More information about the wp-hackers mailing list