Moving a WP blog from a subdirectory to main domain?

8 replies
I recall a thread here a while back about moving a WP blog from a 'test' domain to another domain, but I don't think it addressed a blog that you install in either a subdomain or its own directory.

I currently have a static/normal site that I'm thinking about changing to WP format.

I installed the blog in a site.com/blog/ directory....before I go any further with this, if I decide to convert the main site to the blog format, is it easy (or possible?) to copy this to the main site (site.com) if my testing determines that it would be worthwhile?
#blog #domain #main #moving #subdirectory
  • Profile picture of the author AngieRammer
    Originally Posted by Doug English View Post

    I recall a thread here a while back about moving a WP blog from a 'test' domain to another domain, but I don't think it addressed a blog that you install in either a subdomain or its own directory.

    I currently have a static/normal site that I'm thinking about changing to WP format.

    I installed the blog in a site.com/blog/ directory....before I go any further with this, if I decide to convert the main site to the blog format, is it easy (or possible?) to copy this to the main site (site.com) if my testing determines that it would be worthwhile?
    You've got me curious!

    How can you test whether it's worthwhile or not without actually moving it?

    If you can move a blog from one domain to another (which you certainly can) -- it's even simpler to move the blog from a subdirectory to the main directory -- because you won't have to move the database.

    You just need to find the references where the software sees itself in the subdomain and change them. Those references could be (are, I'm sure) in either the files or the database. Then move the files.

    An alternative would be to just set up a re-direct page on the main url to point to the blog.

    Cheers!

    Angie Rammer
    Word Demon
    {{ DiscussionBoard.errors[718887].message }}
  • Profile picture of the author webpromotions
    Hi Angie.

    Well, I planned on testing this by sending out my broadcast emails to the list on this site to the 'new' blog format as opposed to the main static site.

    Also, I was going to see what happens w/ my SERPS based on the static site and the blog.

    Your answer about changing the references makes sense, but wow...that could mean a LOT of files wouldn't it? I'd have to open like every single file in the WP directory and do a search and replace? Especially considering the themes, plugins, etc?

    Was kind of hoping there might be some software out there thats made to do this sort of thing automatically?

    I wanted to stay away from the redirect because I just assumed that might hurt me with my current organic search rankings, and I also wouldn't want the users to go to site.com and be redirected to site.com/blog.
    {{ DiscussionBoard.errors[718919].message }}
    • Profile picture of the author NickL
      If you don't have content you want to keep in the root directory, one way to do it is to use the domain management feature of your hosting company and simply point the domain directly to the blog folder - so the blog folder becomes the root directory for that domain name. I know you can do this with hosting that allows multiple domains.

      Moving a blog fom one domain to another is actually opposite of what really needs to happen - really, you can keep any blog right where it is physically and just point the old domain away from it (or delete the subdomain) and point the new domain to it. So it is the domain DNS entry that changes, not the location of the blog.
      Signature

      Have an Excellent Day!

      ~ Nick

      {{ DiscussionBoard.errors[718935].message }}
      • Profile picture of the author AngieRammer
        Originally Posted by NickL View Post

        If you don't have content you want to keep in the root directory, one way to do it is to use the domain management feature of your hosting company and simply point the domain directly to the blog folder - so the blog folder becomes the root directory for that domain name. I know you can do this with hosting that allows multiple domains.
        You would still need to change where wordpress looks for its files.
        If it's looking for the files in example.com/blog and you now have the DNS set for the blog to reside at example.com -- it ain't gonna work!!!

        Moving a blog fom one domain to another is actually opposite of what really needs to happen - really, you can keep any blog right where it is physically and just point the old domain away from it (or delete the subdomain) and point the new domain to it. So it is the domain DNS entry that changes, not the location of the blog.
        As for moving a blog from one domain to another -- that was just a reference point for the conversation.
        Also, for the reasons stated above, you still need to change something within the blog.

        If not -- I'd sure be curious to know, in detail, how that would work.
        (diagrams, baby!)

        Cheers!

        Angie Rammer
        Word Demon
        {{ DiscussionBoard.errors[718946].message }}
      • Profile picture of the author NickL
        Oh - and I noticed that you are kinda mixing your terminology. Do you have a subdomain for your blog, or is your blog in a sub-folder? If it is in a sub folder, don't mistake my suggestion that you delete the subdomain to mean that you delete the folder. Yikes, that would suck.

        So... you can keep your static site up while you take each page from it and make a post on the new blog (this is the only way to get the content from the static site to the blog). When you get the blog done and it looks like what you want, then point the domain name to the blog folder. The old site won't display anymore because the new blog folder will become the root.

        I know this works on GoDaddy, HostGator and HostMonster type hosting where you can set up multiple domains with seperate websites for each (in sub-folders)... but I cannot be sure about your specific situation.

        Good luck to you...
        Signature

        Have an Excellent Day!

        ~ Nick

        {{ DiscussionBoard.errors[718952].message }}
        • Profile picture of the author NickL
          Angie makes a good point. I know that you can set up WP to run out of either a sub-folder or as the main website out of the root.

          So - when you point the domain to the blog folder, it will become the root. From WP's perspective, it will be "moving" from the blog folder to the root folder. So how do you tell WP about this move so stuff doesn't break?

          Read through this and it will help you:

          Moving WordPress WordPress Codex

          Have a great day!
          Signature

          Have an Excellent Day!

          ~ Nick

          {{ DiscussionBoard.errors[718976].message }}
  • Profile picture of the author AngieRammer
    You raise a lot of issues, especially wrt to traffic.
    I'm not the best person to help you there.
    However, if you find the information on how to move a blog from one site to another, point me to it, I'll trim it down for you so you only have to do the essential stuff.

    The way wp is designed (and, in fact, any good software) is not to have a ton of references to what is basically one piece of information. That's what makes programming so powerful -- you stick the piece of information in a variable and you generally only have to change it once.

    It's more a matter of finding where that "once" (or possibly a few times) is.

    Cheers!

    Angie Rammer
    Word Demon
    {{ DiscussionBoard.errors[718937].message }}
  • Profile picture of the author MajWorks99
    Please forgive the rank newbie asking a question piggy-backed on someone else's thread.

    I've spent days reading WordPress documentation on the web and came across a reference to exporting a wordpress.com blog site using the "export" feature and importing it into a new installation of WordPress on a hosted domain using the "import" feature.

    Can't the same thing be done to move an "already privately hosted" WP blog to a new domain, or a new folder on a domain?
    {{ DiscussionBoard.errors[718968].message }}

Trending Topics