Sometimes mistakes or installations on the incorrect URL can make it necessary to be able to change the site URL through PHPMyAdmin.
Do you have a WordPress site that is trying to load the wrong URL? Is http://example.com coming up instead of http://example.com/wordpress ? Or http://22.214.171.124/~somename instead of http://yourdomain.com ?
Here is how to fix it! (Be careful, as you do this. If you’re unsure of yourself, backup your database first: http://codex.wordpress.org/Backing_Up_Your_Database)
First log into PHPMyAdmin.
Enter your username and password. (Note, for BlueHost users, if you are unable to log into PHPMyAdmin, you may need to set your MySQL Password first. This can be set using the “Reset MySQL Password Link” also shown in the screenshot above, and featured in the screenshot below)
A list of your databases will appear on the left. Select your desired database then click the browse icon for the options table. Hovering over this icon should show the word “browse”. (If you aren’t sure which database is the right one, check your wp-config.php file to check what your database is)
You will then be presented with a lot of options. Look for the option_name of siteurl and click the little pencil(edit) icon.
After clicking the pencil button, you should see something like the below screenshot. Change the URL in the option_value field, but do not change anything else. (Do *not put a slash after the URL.) Then click “Go”.
You will be taken back to the screen you were on previously. Here you will need to go to the second page. Click the arrow button as shown below:
Once again you will see a long list of options. Look for the home option_name and click the little pencil icon again:
Once again you will be taken to a screen where you can edit the option_value. Change the URL in the option_value field, but do not change anything else. (Do *not put a slash after the URL.) Then click “Go”.
That should be it! Your site URL has now been updated!
(On a separate note, if you had a lot of posts, chances are that images and internal links within your posts may still be broken. You can do the following to fix it.)
In PHPMyAdmin, go to your wp_posts table and click the SQL option at the top. Put something like the following code into it. (Be sure to replace the URLs with your real old and new locations.):
SET guid =
Click “GO” and … that’s it! You’re done.
(On another separate note, sometimes you have to update your .htaccess too. For example, if you moved your site from domain.com/wp to just domain.com, you would need to edit your .htaccess and change the RewriteBase from /wp/ to just / and also change the RewriteRule line from . /wp/index.php to just /index.php )