This boilerplate uses the [drupal-composer]
- Drupal 9 version: ^9.0
- Contenta version 8.x-3.x
- Development mode is already configured. Just Uncomment:
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { include $app_root . '/' . $site_path . '/settings.local.php'; }
insettings.php
file. - Core and Contrib module dependencies are managed by Composer.
These instructions will get you a copy of the project up and running on your local machine for development
- PHP version >= 8.0
- Composer version >= 2.0
NOTE: before running the installation, please make sure to follow the requirements above.
- Go to
/Development
folder. Createwebsites
folder. - Remove
.git
under/drupal-contenta/
folder. - Git clone the
drupal-contenta
under/Development/websites
. - Go to
/drupal-contenta/
folder. - Edit
lando.yml
then change the namedrupal-contenta
to your prefer name or base on your root directory name. - Run
lando start
- Copy the
.env.lando.example
and rename it to.env
. Edit.env
. - Run
lando info
to get the credentials forMYSQL_DATABASE
,MYSQL_USER
,MYSQL_PASSWORD
,MYSQL_HOSTNAME
,MYSQL_PORT
. - Set your
MYSQL_DATABASE
,MYSQL_USER
,MYSQL_PASSWORD
. InMYSQL_HOSTNAME
, leave it asdatabase
value and forMYSQL_PORT
, leave it as3306
. - Copy the
.env.local.example
and rename it to.env.local
. Edit.env.local
. - Set your
SITE_MAIL
,ACCOUNT_MAIL
,SITE_NAME
,ACCOUNT_NAME
,ACCOUNT_PASS
. - Run
lando composer install
in the/drupal-contenta/
directory. - Run
lando composer run-script install:with-mysql
in the/drupal-contenta/
directory. - Edit settings.php and comment the contenta profile config sync
$settings['config_sync_directory'] = 'profiles/contrib/contenta_jsonapi/config/sync';
. Uncomment the config sync$settings['config_sync_directory'] = '../config/sync';
- Run
lando drush config-import
to import the configurations. This is optional, you can ignore this if you have you own configurations. - Uncomment
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { include $app_root . '/' . $site_path . ' settingslocal.php'; }
insettings.php
to enable development mode - To run
drush-cli
, you can uselando drush
. - Last is to run
lando rebuild -y
in your terminal. Make sure you are in the root directory
NOTE: before running the installation, please make sure to follow the requirements above.
- Clone the project repo
- Delete the
.git
folder inside the root directory - Copy the
.env.example
and rename it to.env
. Edit.env
. - Set your
MYSQL_DATABASE
,MYSQL_USER
,MYSQL_PASSWORD
. InMYSQL_HOSTNAME
, leave it aslocalhost
value and forMYSQL_PORT
, leave it as3306
. - Copy the
.env.local.example
and rename it to.env.local
. Edit.env.local
. - Set your
SITE_MAIL
,ACCOUNT_MAIL
,SITE_NAME
,ACCOUNT_NAME
,ACCOUNT_PASS
. - Run
composer install
in the root directory. - Run
composer run-script install:with-mysql
in the root directory. - Edit settings.php and comment the contenta profile config sync
$settings['config_sync_directory'] = 'profiles/contrib/contenta_jsonapi/config/sync';
. Uncomment the config sync$settings['config_sync_directory'] = '../config/sync';
- Run
lando drush config-import
to import the configurations. This is optional, you can ignore this if you have you own configurations. - Uncomment
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { include $app_root . '/' . $site_path . ' settingslocal.php'; }
insettings.php
to enable development mode - Clear cache, Run updb, Run cron
Go to the settings.local.php
. Comment these line of code:
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['page'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
Make sure to change the permission of the folder. List of folders and files to change:
- root/private - 755
- root/private/backup_migrate - 755
- root/web/sites/default - 555
- root/web/sites/default/files - 755
- root/web/sites/default/settings.php - 444