Drupal distributions provide site features and functions for a specific type of site as a single download containing Drupal core, modules, themes, and pre-defined configuration. They make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring all those elements individually.
Switching Drupal profiles in an existing website can be really hard to achieve, due to all the meta data and dependencies between modules, themes, features and other elements. We recently helped the Climate Change Resource Center switching its Drupal website from the Open Public distribution to a standard installation, and these were the steps we took to achieve it:
- Create inventory of modules, themes and features that were needed in the system.
- Create a backup of the database.
- Disable all modules and features that were not needed in the system.
- Uninstall all those modules and features, to clean up the database from information that was not going to be needed.
- Install registry rebuild.
- Identify all required modules, features and themes, and copy them over to the regular sites/all/ locations.
- Execute this drush command:
drush vset --exact -y install_profile standard
- Clear cache:
drush cc all
- Delete the files of the distribution. In our case:
rm -rf profiles/openpublic/
- Rebuild the Drupal registry:
I strongly recommend to execute these steps in a development environment to ensure that they work for you.
After you successfully do the switch, I strongly recommend to take a new database backup, and search for possible records of that distribution in the .sql file using the grep command. I found out that several cache tables store records pointing to the former distribution for few days, until cache actually expires, but you may find some references to that former distribution from modules and features. If that is the case, consider uninstalling and installing/reconfiguring those modules again.