2

How can we do a major update for a live WordPress site, while it’s already running?

WPML is getting a major usability overhaul (by Joen Asmussen). This includes the WPML plugin and wpml.org. We’re going to do vast website changes, including theme edits, changes to page hierarchy and the addition of new pages.

These changes can’t be done gradually. We need to build everything offline and then deploy to the production server. However, we can’t just copy the database over as the site is running. During this update, we’re still going to write new posts and people leave comments.

We need to figure out a way to take a snapshot of the current site, work on the changes offline and then apply all the changes at once and merge with new content that’s been created on the live site.

Here is a diagram of that process:

Initial build and offline rework process

A search in WordPress Codex for staging, reveals some interesting discussions about this, but nothing conclusive nor usable. People agree that it’s a problem, but no one has yet to create a full working process that can be used for any WordPress site.

The biggest challenge is merging between the development version and the live site. Remember that the live site keeps running while we’re working on the development version. When we update the live site with the new development version the new theme will upload, new pages created and some existing pages update. However, blog posts and comments that were written during that time will be preserved. It’s not trivial to do as posts and pages share the same table in WordPress.

The things that will need to move from the development site to the live server:

  1. Everything from wp-contents, including the theme, new uploaded files and plugins.
  2. New entries in the wp_options table. These entries control the way the site and plugins are configured.
  3. New pages and updates to existing pages.

Many of our blog readers are professional designers and developers, so your feedback is very helpful. Do you have a process for moving a site from development to production? How do you handle major updates?

2 Responses to “Switching between development and live sites”

  1. Hi Amir,

    Dd you ever find out how to migrate the WPML tables from Staging to Live. I too need to do this. When I export my MYSQL DB and reimport, while changing the paths, I find I need to re-register WPML and all the language relationships in Posts/Pages are lost.

    • The WordPress import/export facility doesn’t include WPML’s language tables (or any other table created by plugins).

      You should use mysqldump for this, which will include the entire database.