I’m trying to import a site to Local manually.
- Created a blank site on Local
- Replaced the wp-content folder with the new one
The issue is the database import. I exported the database from the site I want to import, which is a 175 MB .sql file. Here is what I’ve tried:
If I try to import it via Adminer, I get a memory error:
Fatal error : Allowed memory size of 268435456 bytes exhausted (tried to allocate 183724600 bytes) in C:\Users*\AppData\Local\Programs\Local\resources\extraResources\adminer\adminer.php* on line 100
I already increased the memory_limit on php.ini to 3000M and I still get the same error.
I pasted the .sql file on the /public folder and ran the following command on the siteshell (local.sql is the file name of the db I’m trying to import):
wp db import local.sql
When I run it, I get this error: Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
Local Version: Version 8.2.1+6583
Operating System (OS) and OS version: Windows 11 Home version 22H2
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.