WordPress.org

Ready to get started?Download WordPress

Forums

"WP installed in /blog directory redirects to main domain after upgrade!" (16 posts)

  1. JosephRatliff
    Member
    Posted 5 years ago #

    I have a blog installed in a mydomain.com/blog directory...and after upgrading...if I type in http://www.mydomain.com/blog it redirects to http://www.mydomain.com by itself, which has my main site and not a blog.

    I can still login to the Admin area and do any function there.

    Help me :)

  2. moshu
    Member
    Posted 5 years ago #

    Did you overwrite the htaccess during the upgrade?

    What are the two URL values in your admin > Settings > General?

  3. JosephRatliff
    Member
    Posted 5 years ago #

    moshu

    Nope...I didn't personally overwrite the .htaccess...and I used the WP Automatic Upgrade plugin to do the job.

    The two url values are http://www.mysite.com/blog and http://www.mysite.com/blog in both fields.

  4. JosephRatliff
    Member
    Posted 5 years ago #

    moshu,

    I should also let you know that I did try to change the permalink structure to a custom structure...which to my understanding would update the .htaccess file...and nothing changed.

    Still have the redirect issue described above.

  5. JosephRatliff
    Member
    Posted 5 years ago #

    Alright...

    Now...after reading some .htaccess posts in the forum here...I have altered my .htaccess file. After adjusting this, http://www.mydomain.com/blog now does NOT redirect any more to the main domain http://www.mydomain.com/

    Instead, now the theme does not show, I have a "white screen" showing.

    I uploaded the following .htaccess to my host:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    # END WordPress

    Do I need to make further mods?

  6. ZmoneyENT
    Member
    Posted 5 years ago #

    I have this same exact problem.

    I just simply changed my permalinks and everything is screwed. Simple thing and I can't even access the admin settings to change it back.

    I had http://audacity.ubercrue.com/blog

    Changed it to

    http://Blog.Audacitysounds.com

    This would have to be the worst bug I have come across...

    Edit:

    I uploaded a htaccess file because I didn't even have 1

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Still doesn't work can anyone explain or tell me part needs to be modified?

  7. JosephRatliff
    Member
    Posted 5 years ago #

    Now...it redirects again.

    If you type in http://www.mydomain.com/blog , it removes the /blog and redirects to my main site http://www.mydomain.com

    No more white screen...but the same redirecting problem.

    All I did in the very beginning of today was use WordPress Automatic Upgrade plugin to upgrade this blog from v2.3.3 to the current one.

    Then...the problems identified in this thread began.

  8. JosephRatliff
    Member
    Posted 5 years ago #

    Oh yeah...by the way I am completely stuck at this point...and I will patiently wait for the experts to reply on this one.

  9. ZmoneyENT
    Member
    Posted 5 years ago #

    I'll also be waiting

  10. JosephRatliff
    Member
    Posted 5 years ago #

    Well, I just said "forget it"...and hired a technical wizard to restore the old version from the backups...as I was tired of it.

    He did mention that it seemed to be a problem with the "login script"...whatever that's worth.

    Sheesh.

    I will leave this as "unresolved" for you ZmoneyENT :)

  11. ZmoneyENT
    Member
    Posted 5 years ago #

    Thanks man.

    Can some 1 give me some help. I don't got no backups :(

  12. iridiax
    Member
    Posted 5 years ago #

    ZmoneyENT: Did you change the WordPress or Blog URL and your blog then broke? If so, check out the following for instructions on moving WordPress and/or restoring your URL settings:

    http://codex.wordpress.org/Moving_WordPress
    http://www.tamba2.org.uk/wordpress/site-url/
    http://codex.wordpress.org/Changing_The_Site_URL

  13. moshu
    Member
    Posted 5 years ago #

    I just simply changed my permalinks and everything is screwed. Simple thing and I can't even access the admin settings to change it back.
    I had http://audacity.ubercrue.com/blog
    Changed it to
    http://Blog.Audacitysounds.com

    Actually, you did NOT change your permalinks - you did change the URL of the blog and that's not the same. You can NOT change the two URL values in the Settings arbitrarily to 'fantasy' addresses...

    Follow the tutorials that iridiax linked to!

  14. ZmoneyENT
    Member
    Posted 5 years ago #

    I was ignorant, I researched it afterwards and relized that I really screwed it.

    I'll use these tutorials as a guide but my host is very hard to get hold of. I'll try these thanks.

  15. ZmoneyENT
    Member
    Posted 5 years ago #

    Quick fix method

    If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.

    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

    Fixed it with that method!

    This is resolved. Thanks allot peoples, wordpress got nice support for nubs like me =)

  16. nerdykitty
    Member
    Posted 5 years ago #

    The quick fix method totally worked!!! Thank God! I was going to start crying. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic