Getting Started
Installing and setup of Radix
In case you are using ddev or lando you have to prefix the commands below with it.
Download and enable the Radix theme:
composer require 'drupal/radix:^6.0'Create a sub-theme using Drush (Considering you are using drupal/recommended-project):
drush --include="web/themes/contrib/radix" radix:create SUBTHEME_NAMENote that
SUBTHEME_NAMEis the name of the theme you'll be working with, make sure ideally the name is in lowercase letters.Note the path in the
--includeflag, if your Drupal is installed inwebdirectory followingcore-recommendedproject, it's fine, otherwise if you are using anything else likedocrootchange it accordingly.Once you've run the
radix:createcommand you'd be shown a caveat as shown below that walks you through the next steps:
radix:create caveat
Set the default theme to your newly created theme:
drush then SUBTHEME_NAME -y; drush config-set system.theme default SUBTHEME_NAME -yGo to the newly created theme directory:
cd web/themes/custom/SUBTHEME_NAMESwitch to the appropriate node version using
nvm:
nvm useIf you don't have the specific node version required by the theme, you'll be shown a message like below:
nvm use Found 'radix/web/themes/custom/SUBTHEME_NAME/.nvmrc' with version <lts/iron> N/A: version "lts/jod -> N/A" is not yet installed.You need to run nvm install lts/jod to install it before using it.Runnvm install lts/jodto make sure you have the latest LTS version of Node 22 installed.
Install the required packages:
npm installAt the root of the theme, create a copy of the
.env.exampleand rename it to.env.local:
cp .env.example .env.localUpdate the
DRUPAL_BASE_URLvariable in your.env.localto point to your localhost address (this file is .gitignored by default to avoid conflicts) - e.g.myproject.localormyproject.ddev.siteFor the development phase:
npm run watchFor the production phase:
npm run productionLast updated
Was this helpful?