I recently imported a site into Local, and was able to get the site up-and-running locally (as far as I can tell, anyway). However, I am unable to log into the site, either by using the Admin button in the Local interface, or by manually navigating to mysite.local/wp-admin. Either of these actions returns our site’s default 404 page.
As I imported, I ran into several issues, which I solved to the best of my understanding. First, the database did not import at all (perhaps because we use non-standard table names?), so I had to import it through the Adminer interface. This meant that I also had to manually update the urls in the tables, and also update wp-config to point to the table prefix. So, I’m not sure if the inability to login to the admin area is related to the way I imported, but I mention it in case it is relevant.
Otherwise, the site is running just fine locally, no broken links, etc.
Any help you can provide a Wordpress newbie is much appreciated!
We aren’t using any plugins like wps-hide-login – I think our plugin setup is pretty straightforward. The 404 page is from Wordpress, it is the same page you’d get from any incorrect URL on our site. Other than being unable to access the admin area, everything seems intact. I’m wondering if there’s some additional configuration step I’m missing?
Yes, in both cases I get a 404, though with /wp-admin I get a redirection (http://tvgs.local/wp-admin/tvgs.local/wp-login.php?redirect_to=http%3A%2F%2Ftvgs.local%2Fwp-admin%2F&reauth=1), is this expected? Navigating to /wp-login doesn’t redirect, but I still get the 404 response.
Oh! Thanks so much, I will change it and let you know how it goes.
Edit: It worked! I really appreciate the help.
One question – does the import process in Local not accept table names that don’t have the standard wp_ prefix? I’m curious if this is the reason my database didn’t import totally smoothly at the outset.
The only time it may get hung up on the prefix is if you provide a backup without a wp-config.php file and an SQL file that contains multiple sets of WordPress tables with different prefixes.
New to localwp. Created a new site, but the site.local URL was insecure (HTTP only instead of HTTPS). I clicked on the “trust” link to install the SSL and everything went kaput.
I solved the issue by clicking “Open site shell” and then entering the following command in WP CLI to replace all http links with https in the database: