Change the Site URL and Home URL on a WordPress Site

| WordPress

If you move your WordPress site, you may have trouble getting your pages to show correctly. Often this problem is caused by two WordPress settings: the Site URL and the Home URL.

These are normally easy to change by going to Dashboard > Settings > General settings page. But sometimes that's difficult to do because the move has broken your access to the WordPress administrator area.

Here's how to fix the problem.

Step 1. Choose the correct database in phpMyAdmin

In this tutorial we're going to use phpMyadmin. Most hosting companies will give you access to phpMyadmin via your hosting control panel. If they don't, they will probably give you a very similar alternative.

tutuploadsmedia_1330126223976.png
  • Access phpMyadmin.
  • Select the correct data base to edit. If you only have one installation on your server, you will only have one choice. If there are more, be sure you are getting the right one.

Step 2. Find the wp_options table

tutuploadsmedia_1330126436429.png
  • Click on wp_options
  • Find option_name siteurl.
  • Click the checkbox then Edit.

Step 3. Edit the option_name value

tutuploadsmedia_1330126588614.png
  • Change the option_value to the correct URL.
  • Scroll to the bottom and click "Go" to save the change.

Step 4. Repeat for the home URL

tutuploadsmedia_1330126747810.png
  • Search or scroll to find "home"
  • Repeat the process.
  • Done!

Expert Option

Or optionally, go to phpMyAdmin and run this SQL query (replace www.domain.com with your domain):

{codecitation}UPDATE `wp_options` SET option_value='http://www.domain.com' WHERE option_name='siteurl' OR option_name='home';{codecitation}

Be sure you have a backup before you try this.