Fix for Changing Site URL in WordPress

Occasionally you will get a user who is interested in changing their site URL. This is a harmless request, but unfortunately many users break their site trying to change their domain within their WordPress dashboard.

If you log into any WordPress dashboard and go to Settings General, there’s a section where you can change your WordPress Address (URL) and Site Address (URL). This give folks the idea that they can change their domain right here, but this is very misleading and will break the site. If we could remove this section of the WordPress settings we absolutely would, but there’s no way around it.

Let’s say a student or faculty member tries to change their domain name from wpdemo.labrumfield.com to test.labrumfield.com:

Fix_WP_URL_1.png

The user edits their fields to their desired URL, scrolls down, and clicks Save.

Fix_WP_URL_2.png

They would then be met immediately with the following error:

Fix_WP_URL_3.png

If they were to attempt to log in again, they would be greeted with a WordPress dashboard that looks like this:

Fix_WP_URL_4.png

There’s no way to reverse the mistake in WordPress. At this point, we need to log into the user’s database and correct the site URL there.

To do this, go to the user’s cPanel, search php in the top search bar, and then click phpMyAdmin.

Click the database for the WordPress instance in question (see note below), and then click wp_options from the drop-down on the lefthand side. The first line should read siteurl and show the recently changed site URL. Click edit.

To find the correct Wordpress database go to cPanel > Applications > My Apps and you will see the database information in the Advanced Tab.

Fix_WP_URL_5.png

On the following page, replace the current URL with the original URL and click Go.

Fix_WP_URL_6.png

Now go to page 2 in wp_options. Click edit next to the home line.

Fix_WP_URL_8.png

Just like before, edit the URL back to the original one, scroll down, and click Go.

Fix_WP_URL_9.png

Now when you refresh the dashboard, all should be back to normal.

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
Reclaim Hosting Support Hours
8:00 am - 5:00 pm ET, Monday through Friday
Submit a Ticket
Get a quick and helpful response from the pros.
Need Extra Support?
No problem, we're here to help! Talk to us about Professional Services or custom Service Level Agreements.