Create install profile and drush make file for legacy site

1 minutters læsning

I had a Drupal 6 site which I installed when first getting to know Drupal. Later I have grown fond of drush make and installationprofiles for several reasons.

  • Versioncontrol. I maintain my sites on github.org.
  • Easy updates. With drush I can easily upgrade my sites.

Steps to introduce an install profile and a drush make file

I went through the following steps to accomplish this task with my legacy Drupal 6 site:

  • Installed drush on the server. I read Howto Install Drush on Dreamhost.
  • Disabled unused themes and modules. I did not want to have problems with legacy stuff that I did not use. I also removed the files files entirely from my installation. Then I ran drush cc all from the command line on the server.
  • Created a backup. I created a backup of the entire site and the database.
  • Created the make file. I created the make file and got it in version control.
  • Uploaded the make file. I made a git clone of my install profile in the profiles directory on my server.
  • Run make file. Now I was able to run the make file using this command: drush make --no-core --contrib-destination=. myprofile.make
  • Make Drupal aware of install profile. Drush is pretty clever: drush vset install_profile myprofile
  • Emptied the cache. Once again I emptied the cache with drush cc all.
  • Reenable modules. For some reason the modules were not enabled anymore, so I reenabled them. Now my site was up to date using the new install profile.
  • Emptied the cache. To end a joyful experience I drush cc all again.

It is easy. So do not hesitate. Get the power of drush an install profiles to your legacy site.

Skriv en kommentar

Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret *

Indlæser...