Backup DB from Production

You could either:

  1. Use a program such as Sequel Pro to connect remotely and then export. Trellis docs: https://roots.io/trellis/docs/database-access

  2. Connect to the server via SSH and export the database via WP CLI. WP CLI doc: http://wp-cli.org/commands/db/export

  3. Use a plugin (as @pixeline mentioned)

There’s also a great thread about leveraging WP-CLI aliases to help automate all of this: Leveraging WP-CLI Aliases in Your WordPress Development Workflow.

4 Likes