How do I import an existing live (not Local) site into a new Local site?

My earlier attempts to recreate an existing site as a Local site failed (a couple of weeks ago). So I deleted the site and created a brand new WP Local site instead. (It has no valuable content.) At least I can access it (which I could not before…)

My thinking is to replace the newly created WP Local with the old site WP setup and its WP database. Is there a problem with this proposed method?

I am familiar enough with the WP setup to know how to download the files into the Local structure. But where do I bring the existing DB file into?

And are there other issues I need to attend to when replacing the newly created WP Local structure by the old one from the outside?

Many thanks,
Jordan

Jordan - (This is an unofficial reply from a Flywheel user)

I have tried on several occasions, what you describe here, and was not successful. It should work.

The best way I have found in bringing a live site into LBF is as (I think) Flywheel suggests: Make a backup of the live site using the “Duplicator” plugin (the free version should work fine unless you have a very large site.) Then import that archive into LBF. It works almost every time for me.

HTH,
Ndna Jnz

1 Like

Hey @Jordan

What you are describing sounds right. In general, the fastest way to import a site is to create a zip file with a database dump sql file and the wp-content folder, and then dragging and dropping it onto Local.

This Youtube video walks through things in a little more detail, especially around the 35s mark:

For more complicated sites like Multisite installations, as well as non-traditional WP folder setups like Bedrock, you’ll need to do a more manual approach like how you are describing.

The main tip would be that the database can be imported either from Adminer from the “Database” tab in Local, or by using wp-cli when SSH’d into the site.

@NdnaJnz @ben.turner – thank you both! I will try to resolve this soonest, and will update.

@ben.turner

Update: I have a partial success in that, following your good instructions, I was able to import the site into Local and view it.

The current problem is that I’m unable to get inside Admin. The wp-login-php page gets forwarded and I get the following error message:

“Forbidden: You don’t have permission to access /wp-login.php on this server.”

So, it’s good to have the site localized, but I can’t do anything with it unless I can get in… :slight_smile:

Would greatly appreciate your suggestions.

Thanks,
Jordan

@ben.turner

Update #2: I’m in… It was an htx file brought in from the hosting service that, correctly, stopped my access.

I’m sure I’m going to have another question or two, like how to bring an older WP database (that includes more content) to replace this one, but I will ask it separately once I get myself settled.

Thank you again for all your help!
Jordan

Great to hear Jordan! Have an awesome day!

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