Upgrading an old WordPress install to a new one on a new host

I have a WordPress blog on my server at home, running the latest Debian-maintained version in the 3.x series. I want to try my hand at virtualizing, and I’d like to do it on my blog, using the latest version downloaded from the site. I have read this post, but I want to clarify about different versions.

Is it recommended to upgrade in place (possibly breaking the WordPress meta-package for Debian) then transfer, or should I transfer, then upgrade? In the latter, would I be able to just directly import a 3.x WP site, or do I need to find the old version, then update it after the data is transferred?

1 Answer
1

Most of the time any changes that need to be done on upgrade are database related. Core files can be freely swapped pretty much.

WP keeps track of this by comparing db_version option (stored in database) against the current value (from core files) on admin load. If there is mismatch it runs the upgrade routine to perform all the necessary changes, until the version is up to current.

In your case the easiest way would probably be:

  1. Unpack latest stable WP core at new location
  2. Copy old database to new location (or simply reuse old one) and configure new core to see it
  3. Copy content folder to new location (configure new core to see it if not placing inside the core folder)
  4. New core would pick it up as existing WP site with outdated database and perform the necessary updgrades

Leave a Comment