How can I import a site into Local by Flywheel

“Add New Site from Archive” Is that a plugin for WordPress or a feature of LbF? Sorry for the noob question, just downloaded and waiting for install…

Thanks!

-[Doris]

Hi,

Im trying to import my zip file that contains my database (sql) and wp-content, but when I start the import I get the message:

“Sorry! We couldn’t figure out what to do with the import file provided. Please extract it manually.”

If the imported doesn’t work, how do I extract it manually?

Thanks

Hey @LB79 - Welcome to the forums!

A couple of questions:

  • Where did this zip come from, or how was it created? It’s possible that if it was downloaded from somewhere, the zip wasn’t fully downloaded, or became corrupted when downloaded.
  • What operating system are you using and do you have any third-party software that is creating the zip archive?

This error message usually means that the archive was created in such a way that Local couldn’t unzip it, or the archive isn’t an actual zip – it’s a rar or tar.gz file.

Sometimes that error is due to the software that is used to create the zip. If you are using a program other than the default applications for Windows of Mac, you might try using the method that comes with the Operating System. Usually that’s a simple as double-clicking on the zip from within a file explorer.

Let us know a little more details about this archive and we should be able to offer some additional pointers.

Hi and thanks for the quick reply.

I created the zip by downloading a copy of my database (.sql) and a copy of wp-content.
Im a Mac user, so I selected both and then right click ‘compress’ to create the zip.

I really want to use Local and come away from MAMP (due to problems problems that occur with ever upgrade), so Im really hoping this is something that’s easily resolved.

Thanks again.

That is odd @LB79

The version is 3.2.1

Does the log contain any personal information (uploading to a public forum)?

Uploading the Local log should be fine. The only user specific information that is contained within the Log is the username when looking at the Local filepath, along with any names of sites as they are being created.

This is the log from yesterday - thanks

@LB79 – Thanks for providing that log!

I’m not seeing errors within the log, so that makes me think there’s something else going on with that specific zip file.

In this video: https://www.youtube.com/watch?v=2G47ttM-AW0 there is a tutorial on what all needs to be included in the file to import the site. You can jump ahead to 35s to find some information on what needs to be there.

Can you try creating a new zip file that has the database dump as well as the wp-content folder and see if that allows you to import the site. Let me know how that goes!

@ben.turner I managed to get a copy of my site loaded up in to Local (Yeahy!), but the site won’t load, its just pages of errors such as

“Warning: include_once(inc/login-page.php): failed to open stream: No such file or directory in /app/public/wp-content/plugins/tq/admin-theme/admin-theme.php on line 3”

Is this something you have seen before with imports?

Thanks

Hey @LB79 – I haven’t seen that specific error before, but you can follow up on what that error is telling you by opening a file explorer to /app/public/wp-content/plugins/tq/admin-theme/ and see if there is a folder called inc with a file called login-page.php

The general gist of the error is that the admin-theme.php file is trying to load another file, but can’t reach it for some reason. It could be that not all of the files were imported correctly, so it might make sense to re-install the plugin so that all of the files exist.

Thanks Ben.
Deactivated a few things and then a few more things and so on until it loaded but with a lot missing due to deactivating plugins and commenting out parts of themes.

I have a fair few sites that I wanted to transfer from MAMP to local and of the 3 I’ve tried so far they all ave this type of problem.

Think it will be easier for me to just stick with MAMP

I have a site working great in Local v3.3.0. No issues. Everything working perfectly for development. The only problem is that I’m not able to push/connect my site to a Flywheel site.

My site doesn’t use a vanilla WP folder structure and I’m compiling/building assets and using webpack (using Sage 9 workflow), but I’m told this should not be a problem with Local or with Flywheel so long as we’re telling WP where to look for the appropriate theme/template files. And, like I said, it works perfectly in Local with no issues.

However, given I can’t push to Flywheel, I’m told by Flywheel support that I should update to the latest version of Local and then try pushing the site to see if it works. The problem is I’m not sure how to import my local site to the newest version of Local. If I simply zip the contents of the site and try import, I get:

Without much else to try and the suggested approach being to import a zip of the site, I wasn’t sure what other options existed and how to proceed.

I don’t want to lose my work but would like to get to a point where my site (that works fine in Local) can be connected with a Flywheel site with no issues. It’s confusing having both a new and old version of Local looking in the same directory for my sites and both looking for ‘local’ for the database. Not sure the repercussions of this and definitely don’t want to lose my current local site which is working fine. But would love to basically get my local site up on a Flywheel site, however I can do that.

Anyone able to help with this or point me in the right direction?

Hey @austinredegg,
Flywheel’s hosting platform locks down everything outside the wp-content folder, so while your site runs fine in Local, it can’t be hosted as-is on Flywheel. Flywheel requires vanilla WP folder structure (as you put it). Sorry about that! One work around could be a script that moves files/folders around to resemble a vanilla WP install before push and puts them back after push.

In terms of having Local sites from multiple different versions in the same directory, you can run these all without conflict! That said, we recommend only using one version of Local long-term to avoid confusion.

Hey @flyjack, thanks for the quick reply. I’ve heard a different answer when speaking with members of Flywheel support. But maybe there is a difference in what we’re referring to as non-standard folder structure.

The main difference in my folder structure is that inside /wp-content there is separation of theme files from page template files, but the theme comes with hooks to tell WP where to look for the right files.

At one point, I needed to restore my site in Local and found the option was available to do an initial “push” to a Flywheel. I did this successfully, without issue. However, after that initial push I received the “Pushing does not support” message in Local, whenever attempting to push again. Any thoughts on why I was able to do this once, but not again?

When pushed from Local, /wp-content appears in the site root directory and the structure looks something like this (which is the same as how they are set up in Local):

Aside from that, outside of /wp-content my structure does appear relatively standard to my knowledge:

Does this mean the site should be compatible for hosting on Flywheel’s platform?

I seem to be able to utilize my page templates and make changes in WP Admin on the Flywheel site I pushed from Local. However, like I said I only had the option to push once when restoring my site, and now I get the “Pushing does not support” message.

So, thoughts on why this worked once but won’t work again?

Do you still believe the issue is with the way my site is set up?

Another issue I’m having is that while I have both the new and older versions of Local, they are using two different databases for the identical site. The site appears in both versions of local, only I don’t understand how I can get the new version to use the correct, up-to-date database (which is what I see when I navigate to the /sql folder in my site in my Local Sites directory).

They seem to be referencing the same site because when I add assets I can see them show up both the old version of Local and the new version of Local, when I run the site. However, on the new version, the site is missing all the content and pages.

In the old version of Local, it uses the site’s SQL files. In the new, it appears to be using the database of a fresh install. So, I have one identical site but with two different databases, one for each version of Local.

What’s the best approach to ensuring the correct database is used on the new version of local. Do I zip my sql files and import them, overriding all the current tables? Is there a way for me to tell the new version of Local to stop using the fresh WP install blank database, and instead to use the correct database?

In the site folder in my Local Sites directory, I only see the correct SQL files. In Adminer, they each just show as a database named “local”, so where/how can I really tell in each version of Local where the respective databases live and how to control which version is being used?

Thanks for uploading those screenshots! So helpful :slight_smile:
Since all the template craziness is happening inside wp-content, you shouldn’t have a problem hosting that on Flywheel. Couple quick questions:

  1. is this a mulsite?
  2. are you modifying WordPress Core files?
  3. could you upload your Local logs here?

In terms of the database issue here are a couple tips:

  • The database dumps in /sql are just for backup. We store the actual site database somewhere else.
  • To fix the database mismatch, zip a folder that contains the correct wp-contents and a fresh export from Adminer (that you know to be the correct database). Drag this new zip into Local. Verify this new site and then delete the previous ones.

Hi there, I am also having issues with an import. I have exported a package from Duplicator and it tells me I am missing sql file. The backup one, but it is there in the zipped folder. Then what happens is that is forces me into the online site. As well I have an error in Local that says settings don’t match, but fix does not work. Help! I am not sure if this is where I should have posted. Thanks!