Site import won't work despite several attempts and tweaks from this forum

What issue or error are you experiencing?

I have been trying to import a Wordpress site multiple times.

I tried troubleshooting but nothing from these threads worked:

Most of my attempts, I got the “try a compatible zip file” pop-up. I zipped the site with either WP Migrate Lite or another plugin Staatic. I tried with less options when exporting (Leaving out the “Wordpress core files”, “Plugins”, “Other files”, etc).

Then I tried unzipping and rezipping only wp-content and the sql file, now this time the issue is that during the import it gets stuck at “Starting up site services” indefinitely. After 20 minutes, I deleted the site.

I also

So I tried doing it manually as instructed in this page (start a blank site, then replace wp-content and add sql) Import/Export a WordPress Site - Local and doing this in shell : wp db import database.sql

But I got the following error in shell (as expected, never lucky with shell/cmd) :
Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

I don’t know how to deal with this one yet. Long story short, I’ve been at this site migration project for over 30-40h of my free time now (just some of it with Local though), so is there an easier potential fix I haven’t tried yet before getting even deeper in the rabbit hole with this sql thing?


System Details

  • Local Version:
    Version 9.1.0+6719

  • Operating System (OS) and OS version:
    Edition Windows 11 Home
    Version 23H2
    Installed on ‎2022-‎10-‎03
    OS build 22631.4317
    Experience Windows Feature Experience Pack 1000.22700.1041.0


Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log]
error.log (12.6 KB)


Hey @evetslefurac

Is there anything unique about this site? Is it overly large? Does it have a lot of media or a bloated database? Is it a multisite?

Are you running other developer applications simultaneously? Apps like MAMP, XAMPP, or Docker for example.

Hi Nick thanks for the response.

Well really it’s just a portfolio website with blog posts, just a few dozens maybe (there’s some interactivity in some of them, like Shiny or Tableau dashboards or a before/after slider), and just a few separate pages that aren’t managed with Wordpress (they are articles).

Export zip file with WP Migrate Lite with all options activated (plugins media etc) is around 850 meg. Though the plugin says it has exported 4gig of data once it’s done?

I wasn’t running docker or xampp or mamp. (the former two are installed but not running as far as I know - I’ll double check).

I’m not sure I would recognize a bloated database if I saw one (visitors can’t submit nor do anything with the site other than reading clicking and playing with some interactive embeds in posts) and I don’t think it is a multisite.

Throwing some guesses here, maybe some plugins are interfering with something.

Right now here are my active plugins :

BEAF - Ultimate Before After Image Slider & Gallery
Classic Editor
Jetpack
PHP Compatibility Checker (not sure why it’s here, was probably part of some troubleshooting)
Polylang (for multilingual, my site has two languages)
Really Simple Security
The MOJO Plugin
UpdraftPlus - Backup/Restore
WP Migrate Lite
Yoast SEO

Hey @evetslefurac!

You mentioned that the site is really small, but the full export is around 4GB, and then you listed UpdraftPlus - Backup/Restore as a plugin. So a possibility here is that there are one or more site backups that were created with that plugin, and those are sitting in the content folder somewhere and getting exported. Extra site backups like this can confuse the native import process. So I’d try to locate and remove those or create a new export without them. Site backups in general are best to be removed from the site and kept in external storage anyways so they don’t contribute to bloat.

Hi @Nick-B - thanks for your help again it’s quite appreciated

So I deleted the Updraft backups from my wp dashboard and looked for others hidden in File Manager but couldn’t find any other one.

Regarding the site size, when the export with WP Migrate is done, the pop-up confirmation windows does say that (now, after deleting backups) “2.46GB of data was exported in 3m 50s” but said exported .zip file is actually only 479 MB when downloaded? And that’s for a full migration (db uploads core files etc everything). I don’t understand what is making my site so heavy as media uploads core files and others were all around 100-300 MB individually (before zipping!),

Also, so far I’ve only tried to create my site with the “Preferred” mode rather than the “Custom” one regarding PHP, Apache and MySQL version. Not sure it’s a big deal, or could this explain it? I tried Custom with partial information. I set the php version to my site’s but as for the server Apache and db MariaDB, version for both have no match in Local’s very limited choice?

Anyway, I exported a zip file again with WP Migrate Lite, one full, another database and media uploads only and tested import of both .zip files in Local, with the Preferred option with the right php version and the closest/most recent Apache and MarioDB ones, still no luck, still got “Please use a compatible zip”.

And no I’m not running any developer apps.

I really feel like my site is plagued (or me lol). To be honest I’m mostly worried about keeping my posts and their original date of publication, not so much the theme/design nor the pages if this can inspire any workaround. I’m very much clueless.

Hey @evetslefurac! You mentioned core files a couple of times. Have you tried doing an export/import without any core files? Since Local provides core files anyways these are redundant and could be another blocker confusing the import.

You also mentioned the Apache and MariaDB options are limited. What server configurations is your live site currently utilizing?

Hi Nick, yes of course I did multiple export attempts with and without WP core files. I tried full, only database, only database and media uploads, then only db and media and plugins, etc. and then full.

A few info provided by the WP Migrate plugin :

Web Server: … Apache
my host (InMotion) also says : ecngx264
PHP: … 8.0.30
MySQL: … 10.6.19-MariaDB-log
WordPress Version: 6.6.2
WP Migrate DB: 2.6.11

some extra :
WP Memory Limit: … 40M
PHP Time Limit: … 90
Blocked External HTTP Requests: None
fsockopen: … Enabled
OpenSSL: … OpenSSL 1.1.1k FIPS 25 Mar 2021
cURL: … Enabled
Enable SSL verification setting: No
Opcache Enabled: … Enabled
ext/mysqli: … yes
WP Locale: … en_US
DB Charset: … utf8mb4
WPMDB_STRIP_INVALID_TEXT: No

Hi again Nick,

Soooo looking for alternative solutions I found out that I could just export and import the WP site from the dashboard in Tools and Import and Export.

More specifically, I exported my currently-online WP site in the dashboard with Tools / Export.

Then, I created a new WP site via Local with the same Server and PHP versions and the most recent MariaDB version available. And with the same domain name (except for the “.com” and “.local”)

Then, before importing into the new local WP, I installed and activated all the same plugins from my online WP site so the import would go smoothly - this was needed because my site is multilingual with the Polylang plugin, without it, the new Wordpress wouldn’t import properly.

Then, from this local WP site’s dashboard I imported the site with Tools / Import.

And then, after importing, just a few tweaks were needed for the new local site to look like the original, I downloaded and activated the base Theme, for which I copied my entire CSS code (“Additional CSS” in Wordpress) and pasted it into the new WP one, and edited options and features in menus there and there, the jetpack plugins, footers, etc. I might have missed some other things to tweak but it looks like the original site now (I noticed only one broken media so far).

So… that’s pretty much it. I think I’ve got what I wanted now. The previous online WP site is now in the local one with Local.

Glad to be probably done with this issue, thanks!

1 Like

I’m glad to hear you finally found some progress with this @evetslefurac! I’m curious now that the site is in Local if you exported it, and then tried to reimport that zip as a new copy if that would work or not :thinking:

There must be some deeper conflict within the site’s configuration that we aren’t thinking of here, but at least you have one working copy for now.

Hey @Nick-B

So yes good idea I just tried that. I tried exporting my new functional local site with WP Migrate Lite with everything checked (db media plugins etc) and, well, the export actually failed at the plugin step, so didn’t make it to importing in Local.

I tried a second time with only 2-3 essential plugins (like Polylang, otherwise import wouldn’t work) the export was successful but then in Local I got a pop-up message saying “Sorry, we couldn’t figure out what to do with the import file provided. Please extract it manually”.

And just out of curiosity I also tried just creating a brand new site with no edits whatsoever except installing WP Migrate Lite for exporting it, then importing it in Local as a new one but here again, I also got the “We couldn’t figure out what to do…”. Strange!

But yes, there still might be something incorrect in my site’s configuration, but whatever it’s working well for now.

Glad to hear you’re at least able to work on the site @evetslefurac!

By the way, just wanted to mention that Local has a native export feature. So when exporting sites from Local you don’t have to use WP Migrate lite you can just Start the site and then select Export from the drop down menu.