Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 8,
How to switch between installation profiles in same instance??
(minimal to standard / standard to minimal)
Comments
Comment #2
ajalan065 CreditAttribution: ajalan065 as a volunteer and at Google Summer of Code commentedHi heykarthikwithu,
You may try out these.
http://davehall.com.au/blog/dave/2012/09/12/switching-installation-profi...
https://www.drupal.org/project/profile_switcher
Comment #3
heykarthikwithuhi @ajalan065, since
vset
not existing in8.x
this might not workout,but will check the
profile_switcher
, how its working :) thanks.Comment #6
geerlingguy CreditAttribution: geerlingguy commentedI had the same question, but for
standard
tolightning
(Acquia's distribution). AFAICT, it might just be adding a line like the following to your settings.php:See also, #2839593-9: Undefined index: name and version on Status report
Comment #7
geerlingguy CreditAttribution: geerlingguy commentedIt looks like there's one more step required to get it working; you have to 'enable' the profile like you would a module. So the entire process for switching to a new profile is:
install_profile
in settings.php:$settings['install_profile'] = 'lightning';
drush cset core.extension module.lightning 0
Comment #9
alexmoreno CreditAttribution: alexmoreno at Acquia commentedsee my drush command for Drupal8: https://www.drupal.org/node/2867180#comment-12277386
Comment #10
jonathanshawYou have to set the profile value in the config, then rebuild caches, then install the profile. This worked for me:
Comment #11
Mr K CreditAttribution: Mr K commented@ajalan065, @geerlingguy, @jonathanshaw, @alexmoreno, @Dropa
Thanks guys for all the great work. Am not a coder and a newbie to drush. Could you give a step-by-step on how to use Profile Switcher with Drush.
I really need to urgently switch from standard profile on an already installed site to a new profile generated with the Features module. I have installed Drush 9.4 on Drupal 8.4.5
Thanks in advance.
Comment #12
jonathanshawInstall the devel module
Go to /devel/php
Paste code from #10
Modify to insert your profile names
Execute
Uninstall devel
Try first on something other than live site
Comment #13
Mr K CreditAttribution: Mr K commentedThanks jonathanshaw. Will try it out.
Comment #14
jonathanshawI missed something, we need to set schema as well. Updated script:
Comment #15
bcweaver CreditAttribution: bcweaver commentedOn my site, after running the code in #14, the admin pages would just show a generic error, logging this error in watchdog (which I could see via drush):
Drupal\Core\Extension\Exception\UnknownExtensionException: The module standard does not exist. in Drupal\Core\Extension\ExtensionList->get()
I was able to get it working by putting the code in #14 in a stand-alone php file and executing it using "drush scr", and then executing the code below using a separate script, also run using "drush scr":
Then clear cache one more time.
Sharing my experience here in case it helps anyone who ran into the same troubles that I did.
Comment #16
Jon PughLooks like you forgot a double ==?
should be
Comment #17
RabiaSajjad CreditAttribution: RabiaSajjad commentedThe solution in #14 works. I needed an additional step prior to executing the code in #14
drush state:delete system.profile.files;
Comment #18
colanThe general comments above are now all incorporated into Profile Switcher, which was mentioned in #2. If you have additional changes, please contribute in that project.