-
Move into the project folder
cd ~/www/sites/FolderName
-
Composer template for Drupal projects https://github.com/drupal-composer/drupal-project
Run Composer Create
composer create-project drupal-composer/drupal-project:8.x-dev drupal --stability dev --no-interaction
Or Use Shortcut
dcc
-
Drush Site Install https://drushcommands.com/drush-9x/site/site:install/
-
Make Directories
mkdir backup && mkdir notes && mkdir project
-
Change Directory
cd drupal
-
Drush Site Install
drush si standard --db-url=mysql://root:root@127.0.0.1/SITENAME_loc --account-mail="noreply@email.com" --account-name=admin --account-pass=admin --site-mail="noreply@email.com" --site-name="SITE NAME" -y
Or Use Drush Site Install Shortcut
dsi DBNAME
Append subdirectory name to Drush si for a multisite install
--sites-subdir=SUBDIRNAME
Site Intall Options
- si ( site-install )
- profile_name ( the install profile you wish to run )
- -v ( Verbose )
- -y ( Assume yes to all prompts )
- --account-mail=admin@example.com ( Defaults to admin@example.com )
- --account-name=admin ( Defaults to admin )
- --account-pass=admin ( Defaults to a randomly generated password )
- --db-url=mysql://root:root@localhost/drupal ( Install using the specified DB params or create new database )
- --site-mail ( From: for system mailings. Defaults to admin@example.com )
- --site-name ( Defaults to Site-Install )
- --sites-subdir ( Subdirectory Name for multisite installation )
additional si options can be found @ https://drushcommands.com/drush-8x/core/site-install/
-
-
Create Symbolic Link to Site Directory
cd ../ && ln -s drupal/web/ www
-
Create Sublime Project
-
Project > Save Project As... > siteName.sublime-project
-
Update Drupal Sublime Project
{ "folders": [ { "name": "Drupal", "path": "../drupal", "folder_exclude_patterns": [ "notes", "drupal/web/sites", "drupal/web/modules", "drupal/web/themes", "drupal/web/libraries", ], }, { "name": "Sites", "path": "../drupal/web/sites" }, { "name": "Theme", "path": "../drupal/web/themes/custom/THEME_NAME", "folder_exclude_patterns": [ "app", "templates", ], }, { "name": "- Templates", "path": "../drupal/web/themes/custom/THEME_NAME/templates" }, { "name": "App", "path": "../drupal/web/themes/custom/THEME_NAME/app", "folder_exclude_patterns": [ "js", "sass", "svg", ], }, { "name": "- JS", "path": "../drupal/web/themes/custom/THEME_NAME/app/js" }, { "name": "- SASS", "path": "../drupal/web/themes/custom/THEME_NAME/app/sass" }, { "name": "Contrib Themes", "path": "../drupal/web/themes/contrib/", }, { "name": "Modules", "path": "../drupal/web/modules" }, { "name": "Libraries", "path": "../drupal/web/libraries" }, { "name": "Project Root", "path": "../", "folder_exclude_patterns": [ "drupal" ], "follow_symlinks": false, } ], "settings": { "tab_size": 2 } }
-
-
Install Contributed Modules
TODO: Create Installation Profile to include all base modules
Change to Project Root Direcotry
cd drupal/
Install Contributed Modules
composer require drupal/admin_toolbar drupal/block_class drupal/block_visibility_groups drupal/coffee drupal/color_field drupal/devel drupal/eck drupal/entity_reference_revisions drupal/eu_cookie_compliance drupal/features drupal/field_group drupal/filefield_paths drupal/google_analytics drupal/google_analytics_reports drupal/honeypot drupal/iframe drupal/image_effects drupal/image_url_formatter drupal/inline_entity_form drupal/metatag drupal/module_filter drupal/pathauto drupal/rabbit_hole drupal/redirect drupal/responsive_favicons drupal/token_custom drupal/token_embed_views drupal/token_filter drupal/twig_tweak drupal/video_embed_field drupal/viewsreference drupal/xmlsitemap drupal/yoast_seo;
-
Additional Contrib Modules
composer require drupal/address; composer require drupal/auto_entitylabel; composer require drupal/computed_field; composer require drupal/contact_block; composer require drupal/content_access; composer require drupal/custom_search; composer require drupal/ds; composer require drupal/front; composer require drupal/imce; composer require drupal/login_destination; composer require drupal/markdown; composer require drupal/menu_block; composer require drupal/menu_item_role_access; composer require drupal/modal_page; composer require drupal/prepopulate; composer require drupal/profile; composer require drupal/sharethis; composer require drupal/special_menu_items; composer require drupal/taxonomy_menu; composer require drupal/userprotect;
-
Color Field
-
Edit the composer.json file of your website and under the repositories: { section add:
{ "type": "package", "package": { "name": "recurser/jquery-simple-color", "version": "master", "type": "drupal-library", "source": { "url": "https://github.com/recurser/jquery-simple-color.git", "type": "git", "reference": "master" } } }, { "type": "package", "package": { "name": "bgrins/spectrum", "version": "1.8.0", "type": "drupal-library", "source": { "url": "https://github.com/bgrins/spectrum.git", "type": "git", "reference": "1.8.0" } } },
-
Run Composer Require
composer require recurser/jquery-simple-color bgrins/spectrum;
-
-
Webform
https://www.drupal.org/node/3003140
-
Edit the composer.json file of your website and under the extra: { section add:
"merge-plugin": { "include": [ "web/modules/contrib/webform/composer.libraries.json" ] }
-
The merging is accomplished by the aid of the Composer Merge Plugin plugin, from project root run:
composer require drupal/webform wikimedia/composer-merge-plugin;
-
Run Composer Update
composer update
-
Add webform private files directory to
sites/default/settings.php
$settings['file_private_path'] = 'sites/default/files/private';
-
Create Private Files DIrectory
mkdir web/sites/default/files/private
-
-
Magnific Popup
https://www.drupal.org/project/magnific_popup/issues/2857287
-
Edit the composer.json file of your website and under the repositories: { section add:
{ "type": "package", "package": { "name": "dimsemenov/magnific-popup", "version": "1.1.0", "type": "drupal-library", "source": { "url": "https://github.com/dimsemenov/Magnific-Popup.git", "type": "git", "reference": "1.1.0" } } }
-
Run Composer Require
composer require drupal/magnific_popup dimsemenov/magnific-popup;
-
-
Slick Slider
-
Edit the composer.json file of your website and under the repositories: { section add:
{ "type": "package", "package": { "name": "kenwheeler/slick", "version": "1.8.0", "type": "drupal-library", "source": { "url": "https://git@github.com/kenwheeler/slick.git", "type": "git", "reference": "1.8.0" } } }, { "type": "package", "package": { "name": "gdsmith/easing", "version": "1.4.1", "type": "drupal-library", "source": { "url": "https://github.com/gdsmith/jquery.easing.git", "type": "git", "reference": "1.4.1" } } }, { "type": "package", "package": { "name": "dinbror/blazy", "version": "1.8.2", "type": "drupal-library", "source": { "url": "https://github.com/dinbror/blazy.git", "type": "git", "reference": "1.8.2" } } }
-
Run Composer Require
composer require drupal/slick drupal/slick_entityreference drupal/slick_views kenwheeler/slick gdsmith/easing dinbror/blazy;
-
-
Chosen
https://www.drupal.org/project/chosen
-
Edit the composer.json file of your website and under the repositories: { section add:
{ "type": "package", "package": { "name": "harvesthq/chosen", "version": "1.8.2", "type": "drupal-library", "dist": { "url": "https://github.com/harvesthq/chosen/releases/download/v1.8.2/chosen_v1.8.2.zip", "type": "zip" }, "require": { "composer/installers": "^1.2.0" } } }
-
Run Composer Require
composer require harvesthq/chosen drupal/chosen;
-
/admin/modules/uninstall
- unistall contact module
drush pmu contact
/admin/modules
- admin_toolbar
- admin_toolbar_tools
- block_class
- block_visibility_groups
- chosen
- chosen_lib
- coffee
- color_field
- eck
- entity_reference_revisions
- eu_cookie_compliance
- features
- features_ui
- field_group
- filefield_paths
- honeypot
- image_effects
- image_url_formatter
- inline_entity_form
- magnific_popup
- metatag
- module_filter
- pathauto
- rabbit_hole
- redirect
- responsive_favicons
- rh_node
- slick
- slick_entityreference
- slick_ui
- slick_views
- token
- token_custom
- token_embed_views
- token_filter
- twig_tweak
- video_embed_field
- viewsreference
- webform
- webform_ui
- xmlsitemap
- yoast_seo
drush en admin_toolbar admin_toolbar_tools block_class block_visibility_groups chosen chosen_lib coffee color_field eck entity_reference_revisions eu_cookie_compliance features features_ui field_group filefield_paths honeypot image_effects image_url_formatter inline_entity_form magnific_popup metatag module_filter pathauto rabbit_hole redirect responsive_favicons rh_node slick slick_entityreference slick_ui slick_views token token_custom token_embed_views token_filter twig_tweak video_embed_field viewsreference webform webform_ui xmlsitemap yoast_seo -y;
Edit the composer.json file of your website and under the extra > installer-paths section add:
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
Landing Page
Edit the composer.json file of your website and under the repositories: { section add:
{
"type": "package",
"package": {
"name": "anavdesign/landing-page",
"version": "master",
"type": "drupal-custom-module",
"source": {
"url": "https://github.com/anavdesign/andesign-drupal-landing-page.git",
"type": "git",
"reference": "master"
}
}
},
Run Composer Require
composer require anavdesign/landing-page
Eanble Module
drush en landing-page -y
sudo find web/ -type d -exec chmod 755 {} \;
sudo find web/ -type f -exec chmod 644 {} \;
sudo chmod 444 web/.htaccess;
sudo chmod 555 web/sites/default/;
sudo chmod 744 web/sites/default/settings.php;
sudo find web/sites/default/files -type d -exec chmod 775 {} \;
sudo find web/sites/default/files -type f -exec chmod 644 {} \;
- Append to .htacecss file in drupal root directory
# PHP Settings php_value upload_max_filesize 64M php_value post_max_size 64M php_value memory_limit 64M