Composer is a nifty tool that helps you manage Drupal and all its associated parts (modules, themes, libraries). Before diving in, be certain you have composer installed on your computer.

When using Drupal 10, it's wise to use the composer template found at dxpr/dxpr-marketing-cms-project. This template ensures that DXPR Marketing CMS project dependencies are the exact same version as the official DXPR release. There are alternative methods, but this one is top-notch.

 

Initiate a project

composer create-project dxpr/dxpr-marketing-cms-project my_site_name_dir

Doing this creates a project in 'my_site_name_dir' and automatically runs composer install to fetch the newest stable version of DXPR Marketing CMS project and all its dependencies.

Note that your 'my_site_name_dir' will house files that should be kept outside of your web root, away from the prying eyes of the web server. The web root will be 'my_site_name_dir/web'.

 

Composer installation via Docker

If you're employing a Docker-based workflow, you might not have composer and its dependencies installed yet. In that case, use the following command to create your DXPR Marketing CMS project:

docker run --rm -i --tty -v $PWD:/app composer create-project dxpr/dxpr-marketing-cms-project my_site_name_dir --ignore-platform-reqs
 

Set up DXPR Marketing CMS project using the standard web interface

Once composer has finished downloading the necessary packages, simply direct your browser to your site's URL and kick off the setup. You'll be prompted for database credentials, an admin user name, and some basic info.

 

Get DXPR Marketing CMS project up and running through the command line

Drush allows you to install DXPR Marketing CMS project from the command line. To add Drush to your project, type: composer require drush/drush and then use drush site:install to launch the command line setup wizard. Without any arguments, it will install the standard profile and only ask for your database credentials.

drush site:install