Have you ever tried updating you website domain name then got an issue where the domain name is changed but you cannot log-in on your website? For example, you're changing your website domain name in the WordPress general settings from www.yourdev.com to www.yourdeveloper.com. The site domain has been changed but you cannot access it and all that you are seeing is the sample image below:
Today, we'll learn how to retrieve your domain name after changing it in WordPress general settings. Note that this does not require database or PHP knowledge, and I am indebted to Webdev Maestro for this resolution.
- Log-in to your website CPanel.
- Then go to the file manager under files section.
- Next is to find the wp-config.php file in the main page of your public manager. If it is not there, you can find it in the public_html folder.
- Right click on the wp-config.php file, then hit view. Then locate define DB Name and take note of the particular name.
- Next, go back to your your CPanel and under databases click phpMyAdmin.
- On the side bar, click on the plus "+" sign beside the name of the database that you have taken note earlier on the wp-config.php to collapse the options.
- Then click on the name of your databases suffixed with "_options".
- You'll see that the siteurl and home have the domain name that you are changing your domain to which also gives you an error. Now, our goal is to change siteurl and home variables.
- Click on the pencil icon on the left to edit each variables.
- Then you'll get to the next page so that you can change the website URL to the old one. Make sure that you are updating it to the initial domain name that you have before changing it.
- Make sure on the options down the page you have the settings below (save and then go back to previous page):
- Do the same for the home variable. If you can't find it on the first page then go to the next.
- Once done, close the current tab, then go to the initial domain name and there you go, you'll have it back. Congratulations! You are able to retrieve your website and domain.
Do you have the same issue?
Let me know what other fix resolution you have for this error.