Presentation vs Content in WP DB-Tables

Presentation vs Content in WP DB-Tables

Is there a clean separation between the WP tables involved with
presentation vs content?

I would like to take my time working up presentation changes,
such as a new theme, in a testing (“staging”) site initialized
to a snapshot of the live site.
When I am done, I want to copy over the relevant data to my
live site, but I don’t want to lose any content changes
(pages or blog entries) that were made during the development.

I know I need to copy over the wp-content directory and to
install the new theme settings. But that’s not the whole story.
Some presentation items that I know are not covered include
the Media Library, Widgets, and Background Images.
I would hope that there are some tables that I can migrate to take
care of these (and perhaps other) presentation aspects without
regressing the content.

So my question boils down to:
Which DB-tables control presentation and which control content?

2 Answers
2

Is there a clean separation between the WP tables involved with
presentation vs content?

I would say “no”. There is no clean separation. There is mostly-separation. Most of your content is in the post and taxonomy tables, and most of your presentation is the options table. But you also have things like sticky post IDs in the options table, which is borderline content vs presentation, and you have widget data, including the widget content where applicable, in the options table which is definitely content, or definitely in my opinion anyway.

There are other questionable cases as well, such as the blog description. It is in the options table but is it content or presentation? Hard to say. It is static across themes but seems like content to me. And that is not to get into to what various plugins might store in the various tables.

In short, I would not count on a clean content vs presentation demarcation in the tables. There is a lot of separation, but I would not call it “clean”.

Leave a Comment