I am new to Local by Flywheel but I love what I see.
I have a site’s files and DB on my local HD. How can I get that set up (import, migrate or deploy - take your pick on which word to use) into Local by Flywheel?
Note - I’m not talk about moving from any other desktop dev environment. Like I said, I have the files in my computer.
The only files that are absolutely required is an SQL file containing the database and the /wp-content folder.
If wp-includes, wp-admin, etc. are missing then Local will automatically pull the latest version of WordPress, set up wp-config.php and then import the SQL file you provide.
I got my zip file (database.sql and wp-content) in Local.
I used Add New Site from Archive. The application begins to process with “Importing Site. Analyzing Archive.” It runs for 5 sec and then returns to Select A Site.
Any ideas of what is going on? I’m on El Capitan and using the built in zip app.
I’ve been trying to do this too. I’ve got the zip file from my live site (cgi-bin.zip) and drop it on Local but it gives me this error…
“Sorry, we couldn’t figure out what to do with the import file provided.”
The structure of your .zip should looking something like this:
wp-content/
database.sql
The other WordPress directories and files such as wp-includes, wp-admin, wp-config.php, etc. can be left out. They’ll be re-added upon import. Only keep them if you do not want to use the latest version of WordPress.
Also, feel free to include other files and directories such as robots.txt.
Woo Hoo! I did it. Sorry but I’m kinda new at this. I realized that, like you said, I was just trying to load the files but there was no sql database. I went into phpMyAdmin of the site I was trying to create locally and exported the database, took that and the wp-content files (I included everything), zipped them together, dropped that zip file on Local By Flywheel and it worked!
There’s a few things messed up on the import but 90% is right. Mostly it’s missing some of the featured pictures and I have a slider at the top of the page with 3 rotating pictures and they don’t show up. I’m hoping I can go into the dashboard and pull that stuff in.
Thanks again for your help. I’m sure I’ll have more questions as I go.
~Jere
Can confirm. This does work, and it works very well. Archive all files, back up database into single sql file in the root of WP, make a zip of the whole thing, Add Site -> Archive in Local. Flawless!
I’m trying to import from WP installation build on Mamp Pro. Finding the wp-content folder is easy… does anyone know where to find the .sql file on Mamp Pro?
Hi, This is my first post here, and I am new to the localhost environment. I also would like to import just the sql data from my live site into a newly-created Local dev site. I have exported the database from the live site using the phpMyAdmin facility in cPanel. I “selected all” and exported in a zip file to my desktop and then attempted to drag the zipped file into the Local window which only has one site in its index. Nothing happened! What am I doing wrong?
Database only imports aren’t supported at this time.
One thing you can do is create a new site in Local, then open up the database using Adminer or Sequel Pro (under the Database tab for that site) and import the SQL there.
Please note: you may need to run a search and replace on the database if the domain in the .sql file doesn’t match your Local dev domain. By that I mean you’re pulling from something like live-site.com and wanting to import it into local-site.dev.
Here’s how you can run the search and replace with WP-CLI in Local:
Right-click on the site in Local
Go to ‘Open Site SSH’
Enter wp search-replace '//olddomain.com' '//newdomain.com'
OK, after MANY hours…I now have the steps for importing a live site into Local by Flywheel on a Mac.
(I did try all of the above but it didn’t all work for me exactly as it said.)
STEP 1:
Go to File manager in your cPanel and make a copy of the /wp-content folder to your local computer
STEP 2:
Go to php MyAdmin and find your database. Click on it then click on EXPORT, “Quick” method, then Format “SQL”. Click GO and save it to the same place you saved the wp-content folder on your computer.
STEP 3:
Now go to where you have saved these two items (wp-content foder & nameofyourdatabase.sql file), highlite them both, right click and compress them together. It will create an “ARCHIVE” zipped file in the same place.
STEP 4:
Go to the Local by Flywheel program and DRAG the ARCHIVE Zip file anywhere into the app box. It will automatically start unzipping and installing. It will save it as “archive.dev” unless you call it something else.
Remember that because this was a backup that you installed, you will need to login with the credentials you normally use away from Local by Flywheel (like when you login into wp-admin). It will not use your Local by Flywheel default username and passsword. After you login you can then go into USERS and add the default Local one and delete the “usual” one.
Hi Ana,
Thank you for this step by step guide !
But there is still something I do not understand: I have imported and old version (local backup) of a website. Importing wp-content and SQL works fine, but when I try to view my site locally, I am forwarded to the domain name of the website.
I have tried to import the site and giving it a completely different name, but still, I am being forwarded to www.darkantzaro.com everytime.
Can you please help?
Many thanks and best regards,
Fouad.