Refresh Database on Local#
You do not need to refresh the database as often as you pull code. Refresh the database under the following conditions:
- It's been a while and you want the newest content on your local.
- You've added content to the live site that you need on local in order to complete work on a feature.
Get the Live Database#
If using Lando:#
- In terminal, make sure you’re in the project folder:
cd ~/Sites/npl-d8
- In terminal, type:
lando pull
- Choose which database you want:
live
- The local database will get updated with the most up-to-date content.
If using DDEV:#
- Follow instructions in the README file in GitHub repo.
Enable Stage File Proxy#
When you get the live database, the Stage File Proxy module will be disabled. If you want to see images, you'll need to re-enable it.
- In terminal run the Drush enable command:
ddev drush en [module-name]
ORlando drush en [module-name]
- Clear cache:
ddev drush cr
ORlando drush cr
- You're done. Do NOT commit the module.