Local WP – Adminer running out of memory upon sql import – Fatal error

Actually we can now use “wp” command line and following method worked for me.

  1. Put the desired site.sql file into /app/public/ folder
  2. Open Site SSH from Local WP (previously flywheel)
  3. You should be able to use “wp” command line
  4. Type command – wp db import site.sql

Via MySql

  1. Put the desired site.sql file into /app/public/ folder
  2. Open Site SSH from Local WP (previously flywheel)
  3. Type mysql, hit enter to go MySQL Command-Line Client
  4. List Databases – show databases;
  5. Select Database – use local;
  6. Type – source site.sql;

This used to work before but it is not

This is the exact copy from the flywheel forum community. Link to the original page is below. This is a great answer. Enjoy

Adminer running out of memory upon sql import – Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 174873888 bytes) in /etc/scripts/local-adminer.php on line 92

In this case I would recommend using MySQL CLI (command line) to get this job done.

Here’s what you can do –

  1. Move the SQL file into the site’s /app directory (untar it if it’s tar/gzipped)
  2. Right-click on the site in Local’s sidebar and go to “Open Site SSH”
  3. Enter mysql -u root -proot local < /app/SQLFILENAME.sql (replace SQLFILENAME.sql with the correct name) and then press enter