I’m trying to move a website from Laragon to Local. I first tried creating amnually a backup of the database, creating a zip file with the sql file and the wp-content folder and finally dragging the zip into Local. The website is created but it doesn’t work at all. Looking at the database using Adminer I saw that site_url was http:/codingfix.local, with only one slash. I tried to fix the sql file and import it in Adminer (after having deleted all the tables) but this didn’t work.
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
My last intent has been the one suggested in this topic: Add existing wordpress site from xampp localhost to LocalWP
I have created a backup usng Duplicator and I dragged the zip to Local. I’ve got a message saying that the importing of ome sql file had failed:
The website has been created but it still doesn’t work: Trying to open the WP Admin brings to a strange url: http://codingfix.local/codingfix.test/wp-login.php where “codingfix.test” is the domain of the Laragon website
Trying to visit the website gives a page where only dividers are visible. In the console I see the expected text but all images are linked as they were on http://codinfix.test instead of codingfix.local. I use FSE Greenshift theme and in the console I don’t find nor the header nor the footer.
System Details
Local Version:
Version 9.1.0+6719
Operating System (OS) and OS version:
Windows 10 Pro OS Build: 19045.5011
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
I’m seeing this error repeating a handful of times in the log:
"Unable to import C:/Users/Usuario/Local-sites/codingfix/app/sql/url.sql","stack":"Error: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n`url` varchar(500) NOT NULL,\r\n`cache_tag' at line 1\n
Just to double check compatibility quick was the site using the same MySQL version previously that you have set up with the Local version? There could be other causes for this error but just wanted to ask that first.
Hi Nick-B, thank you for your reply
In fact, I had also noticed that repeated error in the log file and I figured it might be caused by using an outdated version of MySQL during the database export. I tried updating the MySQL version in Laragon (it’s actually a very old installation, still using MySQL 5!), but I ran into issues there as well
I’m now trying to resolve the issue by updating Laragon, and after that, I’ll repeat the entire process and get back to you with the results.
Thanks again, and talk soon!
Okay. After hours spent to ugrade mysql version in Laragon, I got it. Then I made a new backup with Duplicator and dragged the zip file in Local. Things are slightly changed but not so much:
Trying to access WP Dashboard gives a 404 error, Visiting the site is a bit better: header and footer are visible but all css, scripts and images are linked to Laragon domain instead of the new one. Since I can’t access the Dashboard I can’t use aplugin such Search and Replace and doing changes to the raw sql file i quite difficult… I tried All-in-One WP Migration, which in effect asks what to change in the DB but it down’t change anything: the sql file is identical to the one provided by Duplcator.
Have you some suggestions about the better way to manage this?
EDIT: I tried to manually make the changes to the sql file and re-import the website. Just a bit better on the frontend side, but Wp Admin kepps being unaccesible: the url duplicates the domain name: codingfix.local/codingfix.local but this repetition is not found in the database. I can’t guess what’s going on, here…
Last news. I checked the DB with AdminerEvo and in the wp_options table I saw that site_url and home were set to http:/codingfix.local. Changing this to http://codingfix.local gave me back a working frontend. But I can’t login: “Sorry, you are not allowed to access this page.”
Any idea?
EDIT: I have followed a lot of tutorial about this issue but with no success. I can login but I’m redirected to the live website. If I type codingfix.local/wp-admin I get the message above. It’s no a theme or a plugin; it’s not a permission issue (I’m on Windows a no file is read-only); I have administrator privileges; the .htaccess file is not corupted; the WordPress version is the same in the wp-includes/version.php and in the database… This si driving me crazy!
I’m glad you were able to make some progress at least even though new issues have popped up!
As far as this error, Sorry, you are not allowed to access this page what I would recommend are a few things here. You can click on Site Shell in Local and then use WP CLI to do some things like disable all of your plugins, swap out your theme, or create a new admin user.
For example you could run a command like, wp plugin deactivate --all to see if a plugin is blocking access. If you have any security or user management plugins that could be why.
We have some steps here on creating a user or editing a current user if you want to try that as well:
Hi @Nick-B, I already have cleared the browser cache serveral times. I have deactivated themes, and plugins but with no success. Having no access to the Dashboard I can’t clear the plugin or theme cache.
But I have noticed something curious: running local the first time today and trying to access WP Admin, I’ve got an Internal Server Error. In the site-error.log of Apache I noticed these 2 lines:
Blockquote [Mon Oct 21 16:06:45.641325 2024] [fcgid:warn] [pid 2596:tid 1368] [client 127.0.0.1:64461] mod_fcgid: read timeout from pipe
[Mon Oct 21 16:06:45.641325 2024] [core:error] [pid 2596:tid 1368] [client 127.0.0.1:64461] End of script output before headers: index.php
All next attempts to open the WP Admin give the permission message
I did an experiment changing the default browser in Local and settin it to Edge. WP Admin brings to the home page.
Ad I said, I have already tested any fix suggested in several articles found on Internet with no success.
I have opened a topic with the support of WP Migrate (Lite) as last hope: unfortunately even if I try to exports only the database, migration fails. I think that, if they (you, that is Wp Engine) give me a solution to complete the export process, then hopefully importing the website in Local will work
In order for us to help further could you share an update Local Log here? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.
Rewinding here a bit @marqus since you mentioned WP Migrate Lite. Were you using that plugin to try and export it from your Laragon environment and then import it into Local?
When you exported it did you include everything? Or what happens if you export only the WP Content and database?
I tried to use WP Migrate Lite in my local site in Laragon. And regardless of whether I tried to export the entire site or just the database, the result was always the same: when I got to the last item of the export, I received the message that the export had failed. The only error message is “File dump info empty”.
So, supposing I was trying to wxport event themes, plugins and mu-plugins, the process stopped at mu-plugins. If I dropped mu-plugins from the list, the process stopped at plugins. And if I tried to export only the database, the process stopped immediately. Always with the same message. I’ve found nothing in Google.
Don’t you find it a bit strange?
Yes my only thought is that there some sort of configuration mismatch or compatibility issue if the site was older. You mentioned it was using MySQL 5, what else was the site using as far as WP/PHP/Server?
Hey @marqus! Following back up here in the public thread. We did some extensive testing with your site and were unable to get things 100% working. That said, we were able to get some progress.
Here are the steps we found most fruitful:
Create a blank site in Local.
Turned the site off.
Open the site folder
Delete the wp-content folder
Copy the wp-content folder from the .zip and move it into the new site at the same spot
Copied the DB dump and moved it into the site root (App>Public)
Ran wp db import {my-db-name.sql}, watched it succeed
Started the site again
WP Admin loads now, at least, and we can see all the plugins and themes. However, it does throw a warning that the theme is broken.
Going from here you may want to also do a Search and Replace with something like replacing codingfix.local with / or even just a blank space to remove it from paths.
Unfortunately, we also noticed the uploads didn’t come through. The posts and post meta tables are empty, which is odd because we can see them in the .sql file, and they definitely have instructions to write values to that table.
Some of the data definitely comes through though, because we can see weird stuff like the _mig_queue_jobs table exists and has content but as far as we can see, we never get any error on the import.
So there may still need to be some further development and cleanup to get this thing completely patched up, but hopefully the steps above at least help to get you into the Admin and able to proceed.
Hi Nick-B, I apologize if I’m here again to bore you with this issue. I’m sorry for the delay but I had a bad flu.
Today I tried to foolow your steps but I get this error when trying to import the db:
Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
This happens both with the website started and stopped. If I import the DB through AdminEvo I get all previous issues…