• CptnJack

    (@cptnjack)


    Hey all, thanks in advance for your help.

    I have a site, lets say at domain.com that contains the wordpress main page and all. I want to MOVE all of the main content to domain.com/subdirectory and create a new main page, with no links to the old content (for now).

    In other words, I want the result to be domain.com (all new)
    domain.com/subdirectory (current content with no direct links)

    I’ve found quite a bit of support for people who have installed into domain.com/subdirectory and now want it in the root but so far nothing on hiding a site in …/old

    Any help would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Casey Driscoll

    (@caseypatrickdriscoll)

    Ahoy CptnJack,

    If I understand correctly this should be a relatively easy move. And just to be clear, you DO NOT care about SEO or saving old links, right? You just want to make it go away? (some rewrite rules in your server could preserve old links for returning visitors)

    From what I understand, you aren’t moving servers or databases, right? This should also make it easier.

    It might also help to know who your host is, and if you have access to cpanel or phpmyadmin, but those may not be necessary.

    Before you get started, no matter what, make sure you have a backup!!
    [YOU HAVE BEEN WARNED! PLEASE DO THIS!]

    https://wordpress.org/plugins/backupwordpress/

    Here are the overall instructions:

    http://codex.wordpress.org/Moving_WordPress

    Basically, you just need to change all of your URLs in your DB from http://website.com to http://website.com/old. It’s a relatively easy procedure, but can be intimidating if you are not technically savvy.

    Typically (as an example), I like doing a sql dump of the db, doing a search/replace of the old/new URL in a text editor, and then importing (sourcing) the file into a new db.

    I’ve never used this plugin, but it looks like it should do the trick.
    http://wordpress.org/plugins/wordpress-move/

    Then of course, you just need to move the actually directory into that location.

    If you want further help or more details, I should be able to answer most questions! Including actually ‘hiding it’ behind simple authentication in nginx/apache.

    Hope this helps! Let me know if this doesn’t work for you!

    Cheers!

    Casey

    Thread Starter CptnJack

    (@cptnjack)

    Sort of… not moving hosts or mysql installs or anything crazy.

    Basically, I have all the pages of the site all in the root and I want it to function perfectly in ../subdir

    then the root would have new content and eventually, I would want to add a menu item that takes you to ../subdir

    For now though, I would just not create the menu item. It doesn’t have to be locked down or anything, or even really hidden… just not having links to it would suffice. If someone were to run across the subdir, I could care less.

    Does that make sense?

    Casey Driscoll

    (@caseypatrickdriscoll)

    Yep! I think you’re plan will be difficult to manage though (maybe even impossible?).

    From what I can tell, you don’t want to *physically* move or migrate anything (files or database), you just want to have the current data *appear* to be under a new subdirectory, while remaining in the current WP install. Is this more accurate?

    I think this is much more difficult to accomplish, because WP is a complete system. Some of this may be possible depending on your current WP instance, but depends a lot on the type of data you have. If you have *only* Pages (Pages with a capital ‘P’, not to be confused with posts), you could for example, create a new ‘subdirectory’ parent page, so all Pages would now exist under http://website.com/subdirectory/page. But posts, search, and custom posts types? Bleh. Way too complex for the benefit (if I understand your needs correctly).

    I see two options for you. The first is to use the migrate solution from above to move your site and data *physically* to an actual subdirectory. Then just create a brand new install on root. You can use the same theme and later create menu items to the old info, if you want, but then you’ll have two separate systems running. Much cleaner IMHO.

    Second option I see, convert your site to a subdirectory Multisite (the default, NOT subdomain). Same idea as above, with the benefit that it is now under one main roof, two systems in one.

    http://codex.wordpress.org/Create_A_Network

    Does this make sense? Let me know if I’m not understanding you correctly.

    Cheers!

    Casey

    Casey Driscoll

    (@caseypatrickdriscoll)

    Ultimately, thinking of WordPress in terms of static ‘subdirectories’ will getcha in trouble. Think more in terms of permalinks and slugs. Each slug is unique, so you wouldn’t be able to share a name like ‘subdirectory’ or ‘old’ slug for categories, pagination, tags, pages, posts, etc.

    For EVERYTHING in the current install to APPEAR it is under one roof, it is best to actually move it to its own separate roof.

    Eesh, I hope this makes sense. :/

    http://codex.wordpress.org/Glossary#Slug

    Thread Starter CptnJack

    (@cptnjack)

    Yeah, it does make sense… unfortunately. So let’s attack this from a different perspective then. I think I’ve made the same error here that the people I support make to me. That is, telling me what solution they think they need instead of telling me what the problem is so I can come up with a solution.

    You know my end result, maybe in 6 months or so, is to have some pages (that are now the main content) in a menu item and have the new content be the pages and posts I want people to see immediately. Let me get a little more specific. Maybe if you understand the situation, you will see a better way to do this.

    Let’s say I have a site dedicated to training managers. You have to login to get to any of the content and once in, you have 10 or so pages that serve up the content. The training is for managers. The managers register and then go through the topics. The front page says “manager’s training”

    Enter in the cart before the horse…

    Now lets say I want to train workers instead because the managers aren’t ready, and they won’t be for about 6 months. I want the workers to be able to hit the main site at domain.com and basically see some different things, all new content (so I won’t make this mistake again). I’ll have menu items for training “warehouse,” “accounting,” “marketing” and “managers” as an example.

    The final outcome is to have a welcome page, maybe with time pertinent information (posts) on a front page like “upcoming employee holiday Friday April 18th” or whatever. There would be a training menu with submenus for warehouse, accounting, marketing and managers” (but I would leave the managers menu turned off for a few months)

    What I did was build a site for a specific, higher level group and now I want to expand it to a lower level group and hide the higher level content until it’s ready to be used. When I say hide, it’s not sensitive information, it’s just not pertinent right now. So by hiding, even putting it in an area with no links called managers would work, if it’s stumbled upon, it’s not the end of the world.

    So that’s the problem, the solution doesn’t really matter to me, as long as the end result is achieved. So I guess the question is really: What the best way to achieve this outcome?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Moving a main site to a subdirectory’ is closed to new replies.