Issue Summary
One or two sentence summary of the issue.
LocalWP Dashboard’s WP Admin and Open Site buttons redirect me to the wrong URL after I add the wrong code in site.conf.hbs
Even after delete the sites and uninstall LocalWP, the problem still arises.
Troubleshooting Questions
-
Does this happen for all sites in Local, or just one in particular?
All sites -
Are you able to create a new, plain WordPress site in Local and access it in a Browser?
Yes
Replication
Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
I added some codes in site.conf.hbs with the intention to make the “WP Admin” and “Open Site” buttons automatically open the https version of the domain (without me having to manually change from http to https).
The code is:
if ($http_x_forwarded_proto != “https”) {
rewrite ^(.*)$ https://DOMAIN_GOES_HERE$1 permanent;
}
I got these lines of codes from here (Redirect HTTP to HTTPS / SSL)
I forgot to change https://DOMAIN_GOES_HERE into my domain’s URL.
Now, whenever I click “WP Admin” and “Open Site” buttons, the redirect me to the wrong URL.
WP Admin button redirect me to → https://domain_goes_here/wp-admin/?localwp_auto_login=1
Open Site button redirect me to-> https://domain_goes_here/
I already tried to delete the sites and uninstall LocalWP, but the problem still stuck.
System Details
- Which version of Local is being used?
Local 6.4.3 - What Operating System (OS) and OS version is being used?
-
For example: macOS Catalina or Windows 10 Professional
Windows 11 Home
-
For example: macOS Catalina or Windows 10 Professional
- Attach the Local Log. See this Help Doc for instructions on how to do so:
-
Retrieving Local’s Log
local-lightning.log (14.7 KB)
-
Retrieving Local’s Log
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.