Unable to import site to local

Just downloaded Local 5.0.7+1117 on MacOS 10.15.2

First experience - doesn’t work, perhaps I’m missing something. I used default settings in BackWPup to backup the site, as recommended in your article https://localbyflywheel.com/help-docs/how-to-import-a-wordpress-site-into-local/ and selected the zip in Local. It whirrs then asks for my computer password but meantime gives this error:

Uh-oh! Unable to import site. Error: Command Failed" /Applications/Local.app/Contents/Resources/extraResources/site-binaries/php-7.3.5/bin/php /Applications/Local.app/Contents/Resources/extraResources/site-binaries/wp-cli/wp-cli.phar --path=/Users/name/Local Sites/website/app/public --skip-themes --skip-plugins – url=website.com search-replace --all-tables-with-prefix http://website.com http://website.local Error: Error establishing a database connection

(I’ve replaced my details with name and website in the error message)

Hi @sprout,

Sorry for the issues with importing!

If you create a brand-new site do you see the same error?

Hi,

Setting up an empty site works.

I’ve tried a few different options now with BackWPup on my live site and all produce the same failure message in Local

Is there something I’m missing?

Awesome, glad to hear.


The backup that BackWPup may be incompatible with Local. I’ll add a note to test out some imports on our end.

One plugin that usually works well with Local is Duplicator. Just be sure that the package produced is a .zip and not any other format.

OK I tried Duplicator and got a bit further, but not much.

It now says “Warning! This site’s Wordpress URL settings do not match the host set in Local.”

Pressing FIX IT doesn’t get rid of this warning and nothing much loads when I VIEW SITE.

for info I called the site something like mysite and the domain is mysite.local where as the live site would be like https://mysite.com

1 Like

Bummer!

In that case, can you provide your Local log? See How do I retrieve Local's log file? for details on how to do so.

how do I do that privately?

Feel free to e-mail it to clay@getflywheel.com.

If possible, can you also include the archive you’re trying to import?

sure, I’ve emailed you a link to both site archives - would be great if you can try importing them yourself to see the issue. Thanks

1 Like

Hi Clay, thanks for looking at those files, and finding the wp-config.php extra unnecessary whitespaces issue in constraints like define(‘DB_USER’, ‘’); . Not sure how these extra spaces appeared since the file is automatically generated. I deleted the spaces and site is now unzipping in Local. My next issue is when I visit VIEW SITE all the images are broken and fonts are missing. Please can you tell me if there something else I’d need to do to get it to behave like the live site? I’ve tried turning wifi off and disabling caching plugins like Jetpack and PagespeedNinja but no joy. - any suggestions? Thanks

Just updated to 5.2.3 and this is still an issue on MacOS
The Menu, Images, Fonts and CSS are all missing when I import and view site.
Also the encoding seems different as registered tradmark symbols are coming up as ®
Am I missing a step?

It appears this error is happening to a lot of people. I gave up trying to import a site from export (from local by flywheel).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.