Drupal 8 Website Developer Environments: Unterschied zwischen den Versionen
Erscheinungsbild
| Zeile 17: | Zeile 17: | ||
* Copy as settings.local.php from another development site: | * Copy as settings.local.php from another development site: | ||
cp /var/www/meos/docroot/sites/default/settings.local.php ./ | cp /var/www/meos/docroot/sites/default/settings.local.php ./ | ||
* Fix permissions of settings.local.php | |||
chmod -R g+w settings.local.php | |||
* Edit the file: | * Edit the file: | ||
nano settings.local.php | nano settings.local.php | ||
Version vom 20. Dezember 2016, 15:24 Uhr
Copy Drupal 8 Website to developer environments
- cd in to the new developer environment:
cd /var/www/meos-fh
- Initialize the folder for git:
git init
- Add the Git Repository as a remote called origin:
git remote add origin <repository_URL>
- Pull the repository to the directory:
git pull
- Check out the development branch dev:
git checkout dev
- Fix permissions on sites/default so Drupal can write to it:
chmod -R g+w docroot/sites/default/
- Change to sites/default directory:
cd docroot/sites/default/
- Copy as settings.local.php from another development site:
cp /var/www/meos/docroot/sites/default/settings.local.php ./
- Fix permissions of settings.local.php
chmod -R g+w settings.local.php
- Edit the file:
nano settings.local.php
Change database settings to the new database for the website.
- Change back to the project folder:
cd ../../../
- Run Composer to install dependencies:
composer install
- Pull the database from the main development site: (Drush shell alias needs to be created in the aliases file in /etc/drush/ for the pull-live.db command to work.)
drush @meos.fh pull-live-db
- Import the configuration from the config/sync directory with Drush:
drush @meos.fh cim #(cim is short for config-import)