Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Did you follow the steps outlined here:

http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

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?

Update

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

  • siteurl
  • home

(See comments)

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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