WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_loginout calling wrong url (17 posts)

  1. kjarrett
    Member
    Posted 6 years ago #

    Hi. One of my blogs links here via the Login link:

    http://server302.tchmachines.com/~xicjilzj/blog/wp-admin/index.php

    But it should be linking here:

    http://www.sshrmanj.org/blog/wp-admin/index.php

    How do I make this change?

    Thanks!

    -kj-

  2. Charles Frees-Melvin
    Member
    Posted 6 years ago #

    make sure in your Admin settings you have http://www.sshrmanj.org/blog/ as your sites url

  3. kjarrett
    Member
    Posted 6 years ago #

    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

  4. Dossy Shiobara
    Member
    Posted 6 years ago #

    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';

  5. justinratwebtek
    Member
    Posted 6 years ago #

    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.

  6. kjarrett
    Member
    Posted 6 years ago #

    THANKS GUYS...

    Dossy, I get: http://www.sshrmanj.org/blog/ 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?

    -kj-

  7. justinratwebtek
    Member
    Posted 6 years ago #

    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 = 'http://www.sshrmanj.org/blog/' WHERE option_value = 'http://server302.tchmachines.com/~xicjilzj/blog/' 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.

  8. Dossy Shiobara
    Member
    Posted 6 years ago #

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

    http://www.sshrmanj.org/blog/wp-admin/options-general.php

    Look for "WordPress address (URL)" and "Blog address (URL)" -- that's what you want to correct.

  9. justinratwebtek
    Member
    Posted 6 years ago #

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

  10. kjarrett
    Member
    Posted 6 years ago #

    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

    'http://server302.tchmachines.com/~xicjilzj/blog/'

    anywhere in the DB, and the 'home' variable's 'option value' is http://www.sshrmanj.org/.

    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,

    -kj-

  11. MichaelH
    Member
    Posted 6 years ago #

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

    Resource:
    wp-config.php Advanced Options

  12. justinratwebtek
    Member
    Posted 6 years ago #

    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 justin@webtekconcepts.com as the email address. After logging in, I can poke around enough as a subscriber to possibly see whats going on (possibly..)

  13. kjarrett
    Member
    Posted 6 years ago #

    MichaelH,

    Nope. Vanilla wp-config. Thanks for trying.

    Justin,

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

    -kj-

  14. justinratwebtek
    Member
    Posted 6 years ago #

    Kj,

    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.

  15. kjarrett
    Member
    Posted 6 years ago #

    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?

  16. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    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.

  17. kjarrett
    Member
    Posted 6 years ago #

    Holy mother of GOD!!!!!!!!!

    Otto, thank you so much. FIXED. How do I mark this RESOLVED?

    All of you - thanks.

    I am going to smash my head into the nearest large, immovable object. :)

    -kj-

Topic Closed

This topic has been closed to new replies.

About this Topic