Drupal 8 Website Developer Environments: Unterschied zwischen den Versionen
Erscheinungsbild
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 2: | Zeile 2: | ||
* cd in to the new developer environment: | * cd in to the new developer environment: | ||
cd /var/www/meos-fh | cd /var/www/meos-'''fh''' | ||
* Initialize the folder for git: | * Initialize the folder for git: | ||
git init | git init | ||
| Zeile 29: | Zeile 29: | ||
drush @meos.'''fh''' pull-live-db | drush @meos.'''fh''' pull-live-db | ||
* Import the configuration from the config/sync directory with Drush: | * Import the configuration from the config/sync directory with Drush: | ||
drush @meos.fh cim #(cim is short for config-import) | drush @meos.'''fh''' cim #(cim is short for config-import) | ||
Version vom 10. Januar 2017, 09:18 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 u+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)