Changing your WordPress site and home URL is an easy process that can be done via phpMyAdmin. There are many reasons why you might need to do this, but one of the most common ones would be changing the URL when you do not have access to the previous location or cannot currently access the WordPress admin area. Although this article assumes you are using cPanel, if you skip down to step 4 below, the directions should be the same regardless of how you access phpMyAdmin.
It is critical that you create a backup of your WordPress database before making changes. That way, if you make a mistake, you can restore your database and try again. You may want to check on the following article on how to backup your database: |
Look up the WordPress database name if you don't know it already. It can typically be found in the wp-config.php file where your WordPress site files are located. Look for a line like this, and your database name appears near the end of the line:
define('DB_NAME', 'your_db_name_here'); |
In the phpMyAdmin sidebar, find the options table in your WordPress database. To do that, you may need to click the + symbol next to your username and then locate the name of the database and click the + next to that. Finally select the options table itself by clicking on the actual text of the name (and not on the + like you did the others). This will load the table contents into the main part of this screen.
Often the name of the WordPress options table will be wp_options but it doesn't have to be. The letters and underscore character before the word "options" are known as the database prefix and the prefix could be anything at all or missing entirely. Just look for "options" in the table name and that is probably the correct one. |
Save your change if you're certain it is correct. Make sure Save and Go back to previous page are selected from the drop down menu items at the bottom of the screen and click the Go button.
What is the difference between the siteurl value and the home value? The home value is URL you want people to enter into their browser's address bar to go to your site. The siteurl value is the URL where your WordPress installation is actually located. In most cases both URLs should be exactly the same. |
There are other ways to make this change, either temporarily or permanently. Check the following page for more information: |