Skip to content

Instantly share code, notes, and snippets.

@michael-sumner
Created October 10, 2024 16:23
Show Gist options
  • Select an option

  • Save michael-sumner/82565acb4808c76341442614648a4cd0 to your computer and use it in GitHub Desktop.

Select an option

Save michael-sumner/82565acb4808c76341442614648a4cd0 to your computer and use it in GitHub Desktop.
How to import databases into LocalWP quickly
  1. Create a new LocalWP Site.
  2. Unzip the db_name.sql.gz into the /app/public directory
  3. Open the Site Shell
  4. Visit the MySQL subshell using the command:
wp db query
  1. Create the database, use the database, and import the source file:
CREATE DATABASE db_name;
use db_name;
SET autocommit=0; source db_name.sql; COMMIT;
  1. The import process will begin...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment