WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moving root to sub-directory (4 posts)

  1. Vajrasar Goswami
    Member
    Posted 2 years ago #

    I completed working on a new-website on a subdomain of the old site. But then my boss asked me to link this new site to the old-website.
    I figured out that it can simple be achieved by making sub-directory in old-websites folder.
    but the problem is right now I have url as - http://www.new-site.old-site.com

    and I want it to be as - http://www.old-site.com/new-site after I move it to sub-directory in the old-websites folder.

    How to do that, in a way that whenever user clicks on the link of 'new-site' in my old-site menu, then the user is directed to the Home of 'new-site' where am fetching the latest blog posts of the 'new-site'.

    Thanks in advance.

  2. Ick.

    Basically this: http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite

    Once that's done, you'll want to set up a .htaccess redirect like this:

    RewriteCond %{HTTP_HOST} ^www\.new-site\.old-site.com
    RewriteRule ^(.*) http://www.old-site.com/new-site/$1 [L,R=301]

    Put it in the .htaccess at the root of http://www.old-site.com

  3. Vajrasar Goswami
    Member
    Posted 2 years ago #

    @Ipstenu, Thanks for the reply.
    But meanwhile I did something easier but lengthy.

    I copied DB of my new-site (www.new-site.old-site.com) and then renamed it. Then I copied all the stuff from that directory to the root directory of my old site. and then copied the DB (with the replacements in SQL as new-site.old-site.com -> oldsite.com/newsite) to that new folder I created.

    :) it worked.

  4. You're very lucky. I don't suggest a search/replace of SQL like that for Multisite.

    http://halfelf.org/2012/moving-wordpress-multisite/ is the lengthy explanation :)

Topic Closed

This topic has been closed to new replies.

About this Topic