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?

  • Debian-mantained as in you installed WP using apt? IIRC the packaged WP installs its folders on different locations than the default WP. Makes sense for the package manager (folders in /var/www, scripts on /usr/ or whatever), but can make small confusions that can lead to big mistakes when troubleshooting. That, and there are some WP updates that are CRITICAL to address 0day exploits, Debian packages are nowhere that fast. For those two reasons, I prefer to get WP from the official site. – That Brazilian Guy May 8 '15 at 21:26
  • I agree, which is why I want to update it @thatbrazilianguy – Canadian Luke May 8 '15 at 21:31

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
  • Sound too easy... What's the catch? Jk. I assume everything in my /usr/share/wordpress folders? – Canadian Luke May 8 '15 at 21:53
  • 1
    Not confident about Debian specifics. It seems to be rather common practice to ignore its WP package and just go with "normal" install on LAMP (or whatever) stack. – Rarst May 8 '15 at 22:01
  • Alright. I'll copy everything over on a usb stick – Canadian Luke May 8 '15 at 22:03
  • @CanadianLuke don't forget to copy the wp-content folder with the themes, plugins and specially the media uploads included in posts contents. The former 2 can be re-downloaded, the latter don't. – That Brazilian Guy May 9 '15 at 0:57
  • Content folder... Right. :D I knew I was forgetting something in answer. – Rarst May 9 '15 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.