Hello I've just recently installed wordpress today on a development linux server. Everything seemed ok until when I stupidly changed the wordpress url. Initailly it was just http://localhost/ but I changed that to http://localhost/wordpress in the settings area. Now I cannot seem to login again, because everytime I login, it takes me to a page 404 error. So is there another way to change the wordpress url?


Did you follow the steps outlined here:


Specifically did you copy the .htaccess and index.php files back to the root and edit the index.php file with correct filepaths as stated in points 7 - 9?


The problem was solved by modifying these two options in the wp_options table:

  • siteurl
  • home

(See comments)

  • Ah I see, but I don't really want to change my wordpress url or move my wordpress folder into a new directory. All I really want to do is change the wordpress url back to http://localhost/ – Shehzad009 Nov 28 '11 at 16:18
  • If what you are saying is that all you did was change the "WordPress address (URL)" on the General settings page to "localhost/wordpress", then I think you will need to edit the setting in the database directly. Is that your situation? – ZweiBlumen Nov 28 '11 at 16:21
  • Yes - as I said I can't seem to change it through wordpress's admin settings. So if its from the database (I use MySQL) which table does it store the URL from? – Shehzad009 Nov 28 '11 at 16:30
  • You need to look in wp_options. There's two options: "siteurl" and "home". The first is the setting for "'WordPress address (URL)" and latter for "'Site address (URL)" which is a little counter intuitive, but see here: codex.wordpress.org/Function_Reference/get_bloginfo – ZweiBlumen Nov 28 '11 at 16:33
  • I guess if you set them both to "localhost" that should do the trick. If that doesn't work take a look at this: codex.wordpress.org/Changing_The_Site_URL You can also define these in the wp-config.php file. – ZweiBlumen Nov 28 '11 at 16:33

for me i used MAMP. I went to the table in MyPHPAdmin and edited the data on the place noted. Worked for me! Big lifesaver

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.