Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Create a Drupal 9 Project using composer.

By editor , 3 January, 2017
Question

How to Create a Drupal 9 Project using composer.

Using recommended-project template

 

composer create-project drupal/recommended-project my-project

For more information, see : https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates

 

And also

Get drupal8 using default Packagist.org (The composer packages repository) drupal repository.
composer create-project drupal/drupal drupal8

Few other repositories.

composer create-project drupal/drupal drupal8 --stability dev
composer create-project drupalcommerce/project-base drupal8 --stability dev

If you gave a private repository, You can use a package.json like:

{
    "package": {
        "name": "yourname/your-drupal-project",
        "version": "1.0.0",
        "dist": {
            "url": "https://your.domain/url-to/your-drupal-project.zip",
            "type": "zip"
        }
    }
}

Then:

composer create-project yourname/your-drupal-project drupal8 --stability dev --repository=packages.json

 

 

Tips:

Clear composer cache

composer clear-cache

Tags

  • Drupal 8
  • Code
  • Composer
Install and Update Composer
Download and Install Composer on Linux
Composer - Problems and Errors

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer