1

How is it possible to create a new Drupal distribution based on site that I already built? I've already exported the content types using

drupal config:export:content:type MYCONTENTTYPE --module MYMODULE

Drupal console has the following function which may be useful.

https://hechoendrupal.gitbooks.io/drupal-console/content/en/commands/generate-profile.html

This following link leads to the current drupal.org documentation on creating a Drupal 8 distribution. It looks like it only shows how to create a distribution manually though.

https://www.drupal.org/docs/8/creating-distributions/how-to-write-a-drupal-8-installation-profile

I was hoping that there was something in Drupal console or Composer that would take all the information in my current database and create an installation profile out of it.

EDIT

The Drupal Profile Builder seems wonderful but current only supports D7.

3

Actually, the drupal.org link above will work. At the bottom of the page there is a section that discusses bringing configuration files into the install directory. You can use Drupal Console (DC) to create the configuration files like this:

drupal config:export

It will put all the configurations in the public folder unless you specifiy a directory.

https://hechoendrupal.gitbooks.io/drupal-console/content/en/commands/config-export.html

https://www.drupal.org/docs/8/creating-distributions/how-to-write-a-drupal-8-installation-profile

EDIT

Also, I've added a Drupal.org page has a lot of resources for creating a distribution. On the sidebar it lists common make errors and other useful links.

If you check the release download page of your distribution, you can find the Drupal packager error messages if you send a distribution for packaging.

A lot of this needs to be learned by trial and error. I've spent a fair amount of time on this and still haven't gotten the hang of things.

https://www.drupal.org/node/642116

EDIT

Also, there appears to be something called drupalorg_drush. It's a drush extension that helps build a replica of what drupal.org would do with your distribution files should you upload them to your project's Git repository. However, at the time of this writing, Drupal 8 version is not available.

  • I've been working through this "trial and error" part for a few days. It seems that installation profiles do not work with Drupal 8. If you use the doc link that you pasted on building a profile, they simply do not install without errors. If you include all of the modules that you need in the info.yml, the installation complains about those modules not being available. Having a composer file with dependencies does not help. As I see it, there is no way to complete an installation with a profile out of the box without troubleshooting. – Jason Glisson Jan 12 '18 at 16:12
  • @JasonGlisson this was a real pain I remember. I was able to get by with some hacks. – Parag Jan 13 '18 at 18:19
  • If there is any useful documentation you can send my way, that would be great. Nothing on Drupal.org is correct for this or it's lacking something. – Jason Glisson Jan 15 '18 at 19:55

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.