Set up Drupal8 development site locally from production clone

1. Dump the production db and import locally

prodsite > drush sql-dump > /nonwebrootpath/prod.sql

2. Clone the code and files of production locally

Assume you are making production clone site in local folder "devsite"

3. Change the sites/default/setttings.php

a) change db name in databases['default']['default']
b)

4. Create database 

devsite> drush sql-create --db-url=mysql://root:mysqlpassword@localhost/test860

5. Import database

devsite> drush sql-query --file=/nonwebrootpath/prod.sql

6. Clear cache

devsite> drush cache-rebuild



Comments

Popular posts from this blog

Programatically create layout builder section in Drupal

Code quality analysis of Drupal. Can I use Sonar?

Set up Drupal7 to Drupal8 migration in simple steps (using Drush)