What to Do if You Have Accidentally Changed WordPress URL?

Have you accidentally changed WordPress URL in the General Settings area? This means you can’t to access your website frontend and backend. Don’t worry! This tutorial will show you how to fix this. Yet, firstly, let’s talk a little about WordPress sites’ addresses and why they are so important.

zemez wordpress themes

What Is WordPress Address and When You Can Change It

Among all the settings of WordPress, the most important are two. They are “WordPress Address” and “Website Address”. Both are located in the “Settings” – “General” section. “WordPress Address” is directly your domain, and “Site Address” is the place where WordPress is installed. It can be a subdirectory of / blog / of the main domain or whatever you like.
These settings are responsible for how your website URL will look. They are usually adjusted at the installation stage. Plus, most often, there is no need to change them. That’s why accidentally changed WordPress URL is rather a problem. A solution to it you’ll get below. But sometimes it happens that sites’ owners decide to transfer their websites to a new domain. Or, they need to place sites in a subdomain or subdirectory.
Please, pay attention that that changing a site’s address yourself is not safe. If need to a new domain, for example, better ask for the help of professionals.

Steps to Fix Accidentally Changed WordPress URL

Step 1

Login to your Hosting Control Panel (Cpanel). Open the PHP MY Admin Tool and select your database on the left. changed wordpress url now not working Database name can be found in the main configuration file of WordPress – wp-config.php, this file is located in site root folder. changed wordpress url now not working

Step 2

Go to the Database, click on Search (enter the string of the text, which you have used under General -> Settings).  changed wordpress url now not workingMake sure you have selected Search for All of the tables and click on the Go button. You’ll see this link set in the wp_options table. changed wordpress url now not working

You could also select the database name on the left and directly open the wp_options table. Then search for site_url option name.

Step 3

Go ahead and modify the site_url option value. To do that hit the Edit button (little pencil icon) and simply correct site URL inside the options_value box.  changed wordpress url now not workingClick on the Go button after completing the edits. If everything works fine you will see a pop up message saying ‘1 row was affected’ and how long it took. changed wordpress url now not working
Type the original site_url/wp-admin in your browser address bar and hit the Enter button. You will see the default WordPress login page, where you should enter your username and password. Site is back to normal now.
So, the situations that can cause accidentally changed WordPress URL are under your control now! Let your WordPress website always work correctly!

monster one