WordPress.org

Ready to get started?Download WordPress

Forums

changed my blog URL, now it won't recognize I'm logged in or let me preview. (13 posts)

  1. ozonshak
    Member
    Posted 5 years ago #

    Hello. I recently changed my blog URL from the "General" setting area. It works fine except that when I log into the admin area, my blog will no longer recognize I'm logged in from outside of the admin area. I changed my blog from "http://www.mysite.com/wordpress" to "http://www.mysite.com/blog". The wordpress code is still stored in a "wordpress" directory on my file system. I simply followed the codex to create a new folder called "blog" and moved the index file and the .htaccess file into it. Any ideas why the main blog won't recognize me anymore? It also won't let me preview a blog entry using the "preview this post" button. It goes to a page saying "Sorry, no posts matched your criteria".

  2. Samuel B
    moderator
    Posted 5 years ago #

    delete the .htaccess
    should work now - test it
    then regenerate permalinks
    admin - settings - permalinks

  3. Shane G
    Member
    Posted 5 years ago #

    Hi,

    1. FTP to the site, and get a copy of the active theme's functions.php file. You're going to edit it in a simple text editor (like notepad) and upload it back to the site.

    2. Add these two lines to the file, immediately after the initial "<?php" line.

    update_option('siteurl','http://example.com/blog');
    update_option('home','http://example.com/blog');

    Use your own URL instead of example.com, obviously.

    3. Upload the file back to your site, in the same location. FileZilla offers a handy "edit file" function to do all of the above rapidly, if you can use that, do so.

    4. Load the login or admin page a couple of times. The site should come back up.

    5. Repeat the above steps, but remove those lines. IMPORTANT: Do NOT leave those lines in there. Remove them immediately after the site is up and running again.

    If there is no functions.php file in the theme: Create a new text file called "functions.php". Edit it with notepad, and add this text to it, using your own URL instead of example.com:

    <?php
    update_option('siteurl','http://example.com/blog');
    update_option('home','http://example.com/blog');

    Upload that to your theme directory, then proceed as stated above. Remove the file afterwards.

    Thanks,

    Shane G.

  4. Samuel B
    moderator
    Posted 5 years ago #

    @ Shane G
    she used the instructions here
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    so your advice is not valid

  5. ozonshak
    Member
    Posted 5 years ago #

    Samboll, am I deleting the .htaccess from the "blog" folder or the "wordpress" folder? The codex told me to copy this file to the new "blog" folder. I'm assuming I don't need it in the "wordpress"folder anymore correct?

  6. Samuel B
    moderator
    Posted 5 years ago #

    I'm assuming I don't need it in the "wordpress"folder anymore correct?

    that is correct

  7. ozonshak
    Member
    Posted 5 years ago #

    Thanks that did the trick!

    There is another related problem, I'm hoping you have some insight on. On my blog, I have a login form that, if I remember correctly, I pulled from either the codex or another forum post. This code doesn't work any more after I changed my URL. It is simply supposed to log you in using the same manner as the admin area. Here is the form. the URL at the very bottom used to be /wordpress/ and I changed it to /blog/ (didn't help though). See anything incorrect?

    <form action="wp-login.php" accept-charset="UNKNOWN" enctype="application/x-www-form-urlencoded" method="post">Username:
    <input id="user_login" class="input" maxlength="67108863" name="log" size="20" type="text" />Password:
    <input id="user_pass" class="input" maxlength="67108863" name="pwd" size="20" type="password" /> <input id="rememberme" maxlength="67108863" name="rememberme" size="20" type="checkbox" value="forever" /> Remember Me
    <input id="wp-submit" maxlength="67108863" name="wp-submit" size="20" type="submit" value="Log In" /> <input maxlength="67108863" name="testcookie" size="20" type="hidden" value="1" /> <input maxlength="67108863" name="redirect_to" size="20" type="hidden" value="/blog/" /> </form>

  8. Samuel B
    moderator
    Posted 5 years ago #

    looks good to me

    does it not show at all?
    errors?

  9. ozonshak
    Member
    Posted 5 years ago #

    The login page appears fine, but the functionality is no longer working. Basically, it just takes me to the following URL:

    http://www.mysite.com/blog/login/wp-login.php

    There is a message saying "Oops - There's Nothing Here. It looks like the blog owner hasn't written anything yet!". This is the default message that appears before there are any posts written. Right now, it takes me here whether I type a good ID/password or not. There is also a "welcome back" message that is supposed to be appearing on my main page that isn't showing up. Could it be that it can't find the "wp-login.php"?

  10. davidsanger
    Member
    Posted 4 years ago #

    I just had that problem and it took forever to figure out.

    The solution was with WP getting confused about the WordPress address (URL) and the Blog address (URL) .

    They looked fine in the General Settings panel but I cut and retyped each one and forced it to resave the settings each time and that fixed whatever had been busted

  11. marciaMSPT
    Member
    Posted 4 years ago #

    I need to figure out what my WP blog RSS URL is so I can configure an aweber form for it...

    My blog address is http://www.homehealthpt.com/blog.

    I have also changed the permalinks from general to 'day and name'

    Any help in exactly what my RSS URL is now? Aweber is not recognizing anything. :(

    Thanks,
    Marcia

  12. alism
    Member
    Posted 4 years ago #

    The big "Subscribe to RSS" button on your site might give you a hint? ;-)

  13. maritza1212
    Member
    Posted 4 years ago #

    Hey Shane G,

    Your instructions work man. Thank You soo much.
    Very Very good, worked immediately, back to normal.

    God Bless

    Here is the Blog
    http://newind.es/spain/

    and here is my personal site:
    http://www.webseospecialistinnyc.com/

    I am still new to wordpress.

    Peace!!!

Topic Closed

This topic has been closed to new replies.

About this Topic