0

I've lost the PHP installation of a Drupal 7 site just before a lot of updates were about to be applied. I still have the Drupal database.

If I install a current version of Drupal, it may be out of sync with the database (missing columns that were added by some update etc).

So, how can a new Drupal installation be grafted onto an old database?

2
  • Did you also lose the sites/all directory or sites/yoursite or where ever your settings.php and files directory and the rest were located? Aug 17, 2013 at 9:05
  • 1
    Can you be more specific about the version numbers? What is the core version number of the existing database? Are you concerned about any particular contrib modules being out of sync?
    – schnippy
    Aug 17, 2013 at 14:19

1 Answer 1

1

Treat this as an upgrade. You won't have a problem with missing columns, because those are in your database. You'll have a problem with missing plugins to access those columns.

  1. First, of course, back everything up.
  2. Then install Drupal. It makes sense to follow @Schnippy's hint and look in the database for the version number, and install that version of Drupal. Otherwise, install the current version; it will tell you if it needs to update the database.
  3. Look in your database (hopefully you have phpMyAdmin available) for tables created by plugins. Use that and your memory to reinstall any modules. You might also look at admin/reports/updates and see if it'll list your missing plugins.

Later, I recommend installing the Schema plugin, which will report any mismatches between your modules and database tables. This gets reported on the Status Report page and is wonderful when developing a custom module.

If you lost your images and file uploads from your theme or site/default/files directory, you may be out of luck for that content. Good luck!

1
  • So there is a possiblity of "mismatches between your modules and database tables"? That's what I was worried about.
    – dan3
    Aug 25, 2013 at 7:57

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.