dw‐db‐import - lemachinarbo/ddev-dewire GitHub Wiki

Imports the local DDEV database into the remote server using .env environment-specific database credentials

[!NOTE] This command only works after a ProcessWire installation is uploaded to your server (for example, after using dw-sync). It expects a backup database file at /public/site/assets/backups/database/db.sql. If for example you run this command after deployment, the /public folder will not be present in the root anymore, and the import will fail.

Usage

ddev dw-db-import [ENV] [--silent]

Options

Flag Description
ENV Environment name (e.g. PROD, STAGING)
--silent Suppress output messages

What It Does

  1. Checks required SSH and database variables
  2. Runs MySQL import on remote server

Requirements

  • Your .env file with the required credentials
  • A database backup must exist on the remote server (backup is created by dw-install)
  • SSH access and MySQL permissions on the target server (granted after installing SSH keys with dw-sshkeys-install)