Importing database via manual instructions. WP CLI says "success" but entire tables are missing

What issue or error are you experiencing?


While importing a database backup into a Local site, I see a success message, but no data is actually imported.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


  1. I’m importing a production site manually. I’ve got a SQL export file generated from 10.5.22-MariaDB, via PhpMyAdmin’s Export feature.
  2. I’ve overwritten my local wp-content folder with production
  3. I’ve copied the SQL backup file into public root, named backup.sql
    1. I confirmed it has production data
  4. I shell into the local site, then run wp db import backup.sql
  5. WP CLI shows “Success: Imported from ‘backup.sql’.”
    1. I even tailed the log file while running this command and there wasn’t a single line of output.
  6. When I visit the site, I’m presented with a vanilla WP install.
  7. When I open the local DB in AdminNeo I see there are entire tables present in the backup.sql file that are not present in my local DB.

System Details

  • Local Version: Version 10.1.0+6912

  • Operating System (OS) and OS version: macOS 14.6.1 (23G93)


Local Logs

I can’t include log files


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Ugh. I completely missed the use statement at the top of the SQL file:

CREATE DATABASE IF NOT EXISTS `a6a99379_84098d` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

USE `a6a99379_84098d`;

Did you get this working @andymatthews?

I totally did. Too easy to miss the forest for the trees.

Thank you for following up and letting us know @andymatthews! We’ve all been there. Happy Developing :green_heart: