WordPress Reset : Reset The Site URL

Oh no!  You’ve accidentally changed your WordPress site URL in the admin settings!  What are you going to do?

STEP ONE: Copy the code below and create a file called sitereset.php.
STEP TWO: Upload the file via FTP to your WordPress root folder.
STEP THREE: Open up your web browser and access the file.  (http://www.yoursite.com/sitereset.php)
STEP FOUR: Enter the correct site url information into the text box.
STEP FIVE: Once the site url has been changed to the correct URL, DELETE sitereset.php completely from the server.

The following code is written in PHP 5 and utilizes the mysqli php extension.

Please use this file at your own risk!

8 thoughts on “WordPress Reset : Reset The Site URL

  1. Luke says:

    Just wanted to say thanks. You saved me a whole afternoon of work.

  2. Seb says:

    Thanks a lot Allan for providing this trick! I applied it to my web site and it saved me from having to re-install WordPress.


Leave a Reply

Your email address will not be published. Required fields are marked *