I’m trying to import into Localwp an existing wordpress site of which I only have the general folder of all files and a sql database file.
I proceeded like this:
I installed a test site in Localwp
I opened the database file with an editor and replaced the domain with the new domain provided by Localwp.
I opened the empty database with Adminer deleted the existing tables and imported the database of the site that I want to restore.
I opened the site folder in Local site and replaced the contents of the Public folder with the site files I want to restore.
Later I tried to reach the site from Localwp but unfortunately it doesn’t work, Fatal error is returned in the browser.
What am I doing wrong?
Is there another procedure in Localwp to restore an existing site?
Unfortunately I have no way to access the old original site, so I can’t install plugins. I only have the general files folder and the database.
If you have a
sql you can simply zip them up together and then drag and drop that compressed file into Local which will automatically spin up a new site with those files.
For a more manual workflow, your process would look like this:
You could attempt a more manual import. The steps would look something like this:
Unzip the file in a common location, like the desktop
Create a new, blank site in Local. Use whatever username/password you like since you’ll overwrite the DB with this site archive’s dump.
Copy the wp-content folder from the unzipped location to this newly created site’s location
Copy the correct SQL dump to the site root.
Within Local, open the site shell
Import the dump with wp db import
If that works, now Search and replace the domains. wp search-replace ’
https://production.com ’ ‘http:mylocalsite.local’
thank you for answering.
In the first case, do I have to modify the database? ie replace the domain with the one provided by Localwp, or will the domain be replaced by Localwp?
Anyway I created a zip file with the wp-content folder and the original sql file. I dragged the zip file into Local and it actually created the site, unfortunately it doesn’t open and the browser returns fatal error.
What does the error look like? Can you send a screenshot?
We may need some more details to help further:
I attach screenshots and log files.
MacOsx 11.6 operating system
Based on the fatal error I think what you need is this:
You bet, happy we found the root cause and a path forward on the fix.
In the meantime, if you’re running into this on a site, you can hit “Open Site Shell” and run wp config shuffle-salts and WP-CLI will generate them again for you. Just temporary until the fix is out there!
Can you click
Open Site Shell, run that command and try again?
I opened “Open Site Shell”
and ran the command “wp config shuffle-salts” which confirmed with “Success: Shuffled the salt keys.”
But the site in the browser always fatal error.
The fatal error specifically mentions
envato-wordpress-toolkit-master. If you open the site shell again and run
wp plugin deactivate envato-wordpress-toolkit-master can you see if that will work?
This jogged my memory as I don’t believe Envato Toolkit will work on Local either:
A couple of days ago, I posted a question why Elementor kits don’t work in Local. Or better phrased: partially work in local. I’m talking about Local by Flywheel on your own computer. Not Flywheel online.
After a lot of experimenting, here are my experiences:
I set up a site in router mode localhost. No https.
Then I download a kit from a seller. The kit doesn't work. I get an error message.
I can import the kit, doing it file by file. I have to import each template in its respective page. I…
the command gave an error, but I deactivated the plugin manually by renaming it, immediately after other plugins, such as wp-bakery and slider revolution, were signaled by the fatal error.
By disabling them all, the site actually started up and I entered the backend!
But it’s all broken because the main plugins can’t be activated otherwise they create a fatal error, I’ve already tried.
Thanks for your precious help!
Local is awesome, he recreated the site without even having to change the domain in the database!
Now I’ll just have to figure out how to make these plugins work…
I’m glad you were able to get in there
@WoodyP! Happy Developing
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.