Installation

We highly recommend using our Composer Project Template to build and maintain your WxT derived project’s codebase.

Server Requirements

As Drupal WxT is a Drupal distribution, the official guide for Drupal system requirements will apply.

Installation

  • Composer Download
  • Tarball Download
  • Site Installation
  • Standalone Installation
  • Default Content via Migrate

Composer Download

Run the following commands (choosing your version) and replace site-name with the directory of your choice this is where WxT will be installed.

# Requires PHP 8.1
composer self-update
composer create-project drupalwxt/site-wxt:10.1.x-dev <site-name> --no-interaction

# Requires PHP 8.2
composer self-update
composer create-project drupalwxt/site-wxt:10.2.x-dev <site-name> --no-interaction

Note: Normally you would pass a stable tag to the above command rather then just pulling from the development branch.

Tarball Download

If you don’t want to use Composer, you can install WxT the traditional way by downloading a tarball from WxT’s GitHub releases page.

Note: That the tarball generated by the Drupal.org packager does not include the required Composer dependencies and should not be used without following the specialized instructions.

Containers

For the (optional) container based local development workflow please consult our documentation site:

Site Installation

a) The Drupal Root is in <site-name>/html

b) You can install Drupal WxT through the browser as any other drupal installation or use drush site-install to install the WxT installation profile:

drush si wxt \
  --sites-subdir=default \
  --db-url=mysql://root:root@db:3306/wxt \
  --account-name=admin \
  --account-pass=Drupal@2024 \
  --site-mail=admin@example.com \
  --site-name="Drupal Install Profile (WxT)" \
  wxt_extension_configure_form.select_all='TRUE' \
  install_configure_form.update_status_module='array(FALSE,FALSE)' \
  --yes

Note: If you wish to only install the minimum set of dependencies please remove the wxt_extension_configure_form.select_all='TRUE' flag in its entirety.

c) You can download up-to-date translations using:

drush locale-check
drush locale-update

d) If you work for the Government of Canada you will want to enable the canada.ca theme:

drush config-set wxt_library.settings wxt.theme theme-gcweb -y

Note: You can navigate to the admin/config/wxt/wxt_library settings page.

e) The Drupal WxT site should now be sucessfully installed and you can loging via the /user page.

Note: Please always go to the admin/report/status page and confirm there are no warnings and / or errors.

Standalone Installation

The standalone install is provided as an additional method for those who do not wish to have the full weight of a distribution and its required dependencies. You will need to add at the minimum the below listed modules and themes (including Bootstrap base theme) as well as the WxT jQuery Framework assets installed into the /libraries folder with the proper naming scheme.

Note: We highly recommend that you use the distribution method as limited support is provided for the standalone method.

Default Content via Migrate

The following is an example of how to use the Migrate API module to import common design patterns for Canada.ca aligning to the C&IA specifications:

# Set the WxT theme to GCWeb
drush config-set wxt_library.settings wxt.theme theme-gcweb -y

# Import design patterns for Canada.ca
drush migrate:import --group wxt --tag 'Core'
drush migrate:import --group gcweb --tag 'Core'
drush migrate:import --group gcweb --tag 'Menu'

drush cr

Note: There is a corresponding group wxt_translation and gcweb_translation for importing the corresponding french content.