Support » Fixing WordPress » wp_loginout calling wrong url

Viewing 15 replies - 1 through 15 (of 16 total)
  • make sure in your Admin settings you have as your sites url

    Sure do…do I need to change this in a DB table somewhere?

    I’ve built and run dozens of WP blogs and have never seen this before…

    Thanks, kj

    Do you have access to your database? Perform this query, tell us what the result is:

    select option_value from wp_options where option_name = ‘siteurl’;

    I ran into something like this last night while testing DB issues. In addition to the query dossy suggested, run the following:

    select option_value from wp_options where option_name = ‘home’;

    or both:

    SELECT option_value FROM wp_options WHERE option_name = ‘home’ OR option_name = ‘siteurl’

    They should match. If not, you’ll need to edit.


    Dossy, I get: which is the correct folder where the blog is installed.

    Justin, the results DO NOT match, ‘home’ is the site root.

    Exactly where do I make the change?


    It’s actually in the same table. You can browse the table manually (the “Host” option is usually on the second page in phpMyAdmin) or try the following:

    UPDATE wp_options SET option_value = ‘’ WHERE option_value = ‘’ AND option_name = ‘home’

    Note: the bad address in that query – make sure it’s set to the non-matching address from the previous query.

    Alternatively, you can use the WordPress admin, if you’re not comfortable and/or familiar with editing the database directly:

    Look for “WordPress address (URL)” and “Blog address (URL)” — that’s what you want to correct.

    Doh! Completely forgot about that… Thanks for the reminder Dossy.

    Ok guys I’m sorry but I’m confused.

    First, I don’t see what’s incorrect about the URL in Justin’s earlier query. Looks totally right to me.

    Second, I don’t see


    anywhere in the DB, and the ‘home’ variable’s ‘option value’ is

    Finally, I am looking at options-general.php in Dreamweaver and though I see where the code appears to be calling the variable as directed, I certainly don’t see anything hardcoded, and so I am reluctant to edit it…

    Thanks for continuing to help,


    Any chance you’ve got WP_SITEURL and/or WP_HOME defined in your wp-config.php file?

    wp-config.php Advanced Options

    I’d love to register as a subscriber but you’ve got that option off 😉

    Could you add me as a subscriber? Same username as here with as the email address. After logging in, I can poke around enough as a subscriber to possibly see whats going on (possibly..)


    Nope. Vanilla wp-config. Thanks for trying.


    I’ll add you as a subscriber in a sec. Thanks!



    Tried to reply last night, but aparently the message bounced back…

    It’s not on the backend or DB. I have a feeling it’s in your template. It basically looks like the path is being pulled from the server vs the WP variables.

    I’ve tried to locate the copy of the template you’re using, but the author has changed it to a newer version. Anyway, you’re looking for something like “getpath()” or “pathinfo()” or something similar where the login/logout buttons are. This could be in the Index or Sidebar files.

    Thanks Justin. I will check tonight. Are you saying you think the malformed URL is hardcoded there? Or I should be using a different function call?

    kjarrett: I took a look at your site. Your “Site Admin” section on the sidebar is actually part of the Blogroll.

    Go to the Blogroll screen and edit the two entries for Login and Logout to be the correct links.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘wp_loginout calling wrong url’ is closed to new replies.