WordPress.org

Forums

[resolved] Strange redirect problem (2 posts)

  1. oldpompous
    Member
    Posted 6 years ago #

    First off, I'm sorry if this problem has already been mentioned. I did a search and couldn't find this specific problem mentioned.

    Here's what's going on. I created a website that I was happy with that required a lot of modifications. I downloaded all the files associated with that website from my server, copied them to another folder and uploaded them to another instance of WordPress as a shortcut to creating another website.

    Now, when I type in the address of the second website, http://website2.com, it redirects to the first website, http://website1.com.

    Here are steps I took to troubleshoot it so far:

    1) I typed in specifically http://website2.com/wp-login.php and was apparently able to login to the 2nd website without redirection. The URL is now http://website2.com/wp-admin. Then I went to the General Settings and changed the URLS for WordPress address (URL) and Blog address (URL) from http://website1.com to http://website2.com. I saved the configuration. Now, when I type in http://website2.com, it doesn't redirect to http://website1.com. However, now when I type in http://website1.com, it redirects to http://website2.com.

    2) I went to the General Settings for website2 and tried to change the URL for Blog address (URL) from http://website2.com to ________ (blank). When I tried to save my new settings, it didn't take my changes.

    This technique I used to copy websites worked just fine when I was using WordPress 2.5. Something about WordPress 2.6 is making the difference. I suspect that WordPress 2.6 is changing the htaccess file or something and storing the URLs in the General Settings in some way, but I'm not sufficiently familiar with the inner workings of WordPress to make heads or tails of it, much less fix the problem.

    Other than simply reinstalling the WordPress installation for website #2, is there anything relatively simple I can do to fix this problem?

    Thanks,

    Michael

  2. oldpompous
    Member
    Posted 6 years ago #

    Duh.

    I figured out the problem. It seems that by copying the code from an old instance of WordPress, the files contain the databases I was using. So, whichever domain I specified ended up using the database. Morale of story -- you need to recreate a fresh installation of WordPress every time for each domain.

    You can copy the plugins from your old installation. That doesn't seem to be a problem. If there's a particular file you hacked on your old installation, try copying that over to the new installation one file at a time to make sure you don't break the new installation.

    That was my experience, for what it's worth.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.