Staging a Database Driven Site

One of the challenges I’m facing in working on v2 of the site is the best way to “stage” the new site. Normally it’s pretty easy. Just build the new site locally and export the database when it’s time to launch the new site. However, since the live site is getting new posts, comments, etc. it isn’t as simple.

Since I’m converting content in static pages to the database, there is a fair amount of simple data entry to do. I need this data to be in my main database so that I don’t have to migrate it later1. However, I also need to see this new data in context of the new site design and functionality.

Making things more complicated is my choice to go with WordPress 2.1 for the new site while I’m running the latest 2.0.x here. In other words, I can’t just have both front-ends hit the same database.

What I’m doing at the moment:

  • Create pages (content) in the current production database.
  • When I need to review how the resulting pages looks in the new design, I create a version of it in the local testing database as well using an advanced development technique I call “copy paste”.

I’m sure some of you have worked around this issue before – let’s hear your tips.

  1. In addition, when I make the cut-over to the new site I want it to be fast – no more than 5 or so minutes of downtime. That means I need to get the data into the live database before the cut. [back]