Skip to content

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:#

  1. In terminal, make sure you’re in the project folder:
    cd ~/Sites/npl-d8
  2. In terminal, type:
    lando pull
  3. Choose which database you want:
    live
  4. The local database will get updated with the most up-to-date content.

If using DDEV:#

  1. 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.

  1. In terminal run the Drush enable command:
    ddev drush en [module-name] OR lando drush en [module-name]
  2. Clear cache:
    ddev drush cr OR lando drush cr
  3. You're done. Do NOT commit the module.