• Resolved wdawson

    (@wdawson)


    OK, so I’m an idiot. In the Settings -> General panel I mean to change the “site address” field but accidentally changed the WordPress address (URL) field. Now WordPress thinks its in the wrong place and obviously can’t find the install. Problem is, I don’t know how to change it back because I can’t log in because it’s looking for the install of WordPress in the wrong place. Is there a way I can change this setting in he actual files? Need to get this figured out tonight hopefully, thanks so much!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Do you have FTP access? You need to look around the server files manually to see where it has been moved to. Then once found you can log in and change it back.

    This will be a bit less painful than accessing the db directly, but that is another way you can do it if you are OK with editing the WordPress db.

    Thread Starter wdawson

    (@wdawson)

    I should have FTP access but for some reason I only do to the wp-content directory. Obviously I need to get this worked out with my admin.

    Roy – thanks for pointing me to that.

    I also found I can change
    define('WP_SITEURL', 'http://example.com/wordpress');
    in wp-config.php. It notes that this “overrides the wp_options table value for siteurl and disables the WordPress address (URL) field in the Administration > Settings > General panel.”

    Since that field is the one I changed (WordPress address (URL), it seems like this should work since I didn’t actually move anything, just provided the wrong value in that field. Does that make sense?

    Thread Starter wdawson

    (@wdawson)

    Sorry dgwyer, didn’t see the last part of your post. That’s the thing, I don’t think I actually moved anything. I know what value I provided in that field, but trying to log in there doesn’t work since the WP install isn’t actually there.

    Thread Starter wdawson

    (@wdawson)

    Sorry to keep adding stuff, but this may help. When I try to get to the login panel, I should need to go to http://wp.xxxxx.net/wp/wp-admin. When I try to do so, I get redirected to

    http://xxxxx.org/wp-login.php?redirect_to=http%3A%2F%2Fwp.xxxxx.net%2Fwp%2Fwp-admin%2Findex.php&reauth=1

    The value for WordPress address (URL) should be wp.xxxxx.net/wp.

    I accidentally changed it to xxxxx.org.

    Just follow the instructions that I linked to. It’s not that hard. You don’t have to change the wp-config file. Your problem is that wp-config has something else than the database and wp-config ‘knows’ where the files are.
    The only alternative route is to replace all WP files and edit wp-config so that they match the database setting.

    goto database through phppmyadmin and change value of home and siteurl in wp_options table

    Thread Starter wdawson

    (@wdawson)

    Thanks so much for the help. The problem is, getting access to phpMyAdmin is going to take longer than getting the right FTP access and I need to do this as quickly as possible. Did changing that field in options actually change the database value? The codex notes that making the change I mentioned in wp-config.php

    won’t change the Database value though, and the url will revert to the old database value if this line is removed from wp-config. Use the RELOCATE constant to change the siteurl value in the database.

    Could I not change the value in wp-config.php just to be able to gain access and then change the database value back to what it was?

    Again, thanks so much. I know I’m making this hard..

    Changing wp-config does not change the database indeed, but you changing the address in the WP admin does and that’s exactly your problem. And why would PHPadmin take long?

    Thread Starter wdawson

    (@wdawson)

    It also notes that the wp-config.php change I mentioned would override the wp_options table value. I don’t doubt the methods you guys are mentioning work, I’m just trying to figure out if I can do this through FTP because that would take less time in my current situation.

    Thread Starter wdawson

    (@wdawson)

    Ahh that makes sense. It made it seem like changing the wp-config file would also override the database value if “define(‘WP_SITEURL’, ‘http://example.com/wordpress’);” was defined and then would revert back if it wasn’t.

    Using phpadmin isn’t the problem, I just happen to know that, due to non-technical circumstances, it will take my system admin more time to give me access to that, if that makes sense.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Try the theme editing method:
    http://codex.wordpress.org/Changing_The_Site_URL#Edit_functions.php

    That does fix the value in the database directly, and all you need is FTP access.

    Thread Starter wdawson

    (@wdawson)

    Otto – thanks. That’s what I was asking for. I ended up defining the urls in wp-config and that works.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Please help – mistyped WordPress address (URL)’ is closed to new replies.