I am a WordPress beginner and in the dashboard, under Settings --> General
I changed WordPress address (URL) to http://a.com and Site Address (URL) also to http://a.com just in the curiosity to try the feature unknowing of the fact that it will lock me out.
I am using xampp for a localhost environment.
The canonical article to resolve this problem is on the WordPress website.
If you have a local copy of the website, you can edit your
wp-config.php
file and upload it to the site. Or, if you have SSH access to your site you can use a curses-based text editor such as Nano to make the necessary amendments remotely.You need to override the domain settings you have made, and you can do so using this code:
Upload this file if necessary, and then refresh your admin screen. You may have to log in again. Once you get access to your control panel, fix your incorrect settings. You can then revert the changes to your
wp-config.php
file.