The MU forums have moved to WordPress.org

Optimum Install for subdirs and multidomains (7 posts)

  1. thelaw
    Member
    Posted 15 years ago #

    I've got a bit of a dilemma - I chose Wordpress MU because I needed to have a few mags/blogs, faqs and general static page manager that ran off the same registered user base. Seems simple enough but it isn't and I'm hoping that someone with experience working with WP MU can give me some guidance in proper setup. Here are my parameters for my server:

    Goal: To create 1 install that does the following:

    (a) Allows me to create 3 different blogs/mags/cms that will act on the main domain "vehicles.com". I am going to have a FAQ-zine which would be vehicles.com/faq, a manually created site map which will consist of several static pages in vehicles.com/map/, and a blog at vehicles.com/blog.

    (b) I will also have two different magazines on two other domains called "cars.com" and "autos.com". In theory, it should look like this:

    1) vehicles.com/map/wpurl.htm
    2) vehicles.com/faq/wpurl.htm
    3) vehicles.com/blog/wpurl.htm
    4) autos.com/wpurl.htm
    5) cars.com/wpurl.htm

    While I can install WP MU in the root of the autos and cars domain, I have a custom index.php home page running on the vehicles.com domain and web site. So the questions that really need answer are:

    (1) If you have an index.php running in the root directory, is there a way to install WP in the root so that you can not need to have another URL path to your install. If I install it off the root, I'll have to have this:

    vehicles.com/subdir/map and
    vehicles.com/subdir/faq and
    vehicles.com/subdir/blog

    The above is not optimal at all but i can't figure out a way around this at the moment.

    (2) Assuming I can get it installed properly in the root, am I understanding correctly that to create a second "blog" you just go into the Site Admin and "create new blog" and put in the full URL to the blog, e.g. vehicles.com/faq after i have the vehicles.com/map set up?

    (3) What is the best way to create the WP installs on the other domains, autos.com and cars.com? They are on the same server so that might make a difference as well.

  2. andrea_r
    Moderator
    Posted 15 years ago #

    1. make your custom index.php page a simple WP theme. I've even done this with plain HTMl landing pages, works well, no biggee.

    2. you can go in the backend and just put in the blog *name* only. it figures out the URL on its own, based on what you picked on signup. 2 feilds to fill out, one click and yer done.

    3. I'd domain map them. On a subdir install use the MultiSite manager.

  3. thelaw
    Member
    Posted 15 years ago #

    Andrea - Thanks much for your comments.

    1 - Perhaps I can redo the front page in WP. I'm guessing that I might have to use a home.php for this? I've seen it done so that when going to the site.com/index.php it uses home.php as the front page to show. Is this what you're saying?

    2 - I think I follow. If I put in the name 'map' then WP figures out it means site.com/map/ for the subdirectory. What was confusing to me was if I wanted multiple blogs to run and have a subdirectory, e.g. site.com/map/, whether I'd need to have a second copy of WP MU in the map directory. I'm guessing from your answer that the answer is "no."

    3 - When you mean "domain map" - do you mean to point the other domains to a subdirectory of site.com or, in this example, vehicles.com? Meaning that if you go to autos.com it will redirect to vehicles.com/autos/ but appear as autos.com? I'm not quite sure how this and MultiSite manager work and perhaps you might be able to point me in the direction of the best way to set it up?

    Thanks much. I've worked with WP before but MU can be quite confusing and it's not so easy to find what you need on the WP site as I've seen elsewhere. Again, many thanks!

  4. andrea_r
    Moderator
    Posted 15 years ago #

    1. you don;t even need home.php. you can literally take the index.php you have now, if it has a stylesheet make sure it's called style.css and has the WP stuff at the top, move it to its own theme folder and.... you have a "theme".

    2. that's correct. one install does *multiple* things.

    3. yep. actually it doesn't redirect anything. the new domain is listed as such in the db, you set up the server to handle the requests and presto. It's all in the plugin file & documentation for it (or it should be). You just set up a blog as usual and change it to be a new "site".

    I've got one setup that has ~120 domains, every one set up different, one MU install.

  5. thelaw
    Member
    Posted 15 years ago #

    Sweet and thanks! Just one last question. I'm not sure how you can copy the home page layout into the index.php if the home page layout is completely different than the rest of the site. All the sites don't share the same theme but they do share the same index.php. I'm thinking that you're saying make the theme for the home page different than the rest of the site. But that isn't really the issue - the home page is structurally very different than any other page. Now if memory serves correct, you can stick code in the index.php that will appear only on the home page. I'm not sure I remember exactly how this is accomplished and perhaps you can clarify what you meant. Again, thanks so much for the assistance and am eager to set this all up!

  6. andrea_r
    Moderator
    Posted 15 years ago #

    "All the sites don't share the same theme but they do share the same index.php."

    ... which if you read it, goes and looks up what theme each blog is using.

    Do not touch the index.php file in the root of the MU install.

    take the custom home page you already made, put a copy in wp-content/themes/yoursitename/.

    Do the rest of what I said above. If it has no outside stylesheet or none at all, makes no difference. Doesn't matter what you have in there. you still need a file called style.css with the comments at the top like a regular WP theme has.

    A theme very well can have just a style.css and an index.php.

    If this is boggling your mind, email me a copy of your current index.php and I'll spend 5 whole minutes making it a WP theme.

    Then when you set up WPMU in the root, you make this new theme enabled only for the main blog and choose it on the main blog (which is the root of the site) and there ya go.

    I've already done this on another site - I know it works. :)

  7. thelaw
    Member
    Posted 15 years ago #

    Got it - thanks so much! There's a big surprise - the index.php actually works perfectly in the theme folder, thanks! Didn't even have to change anything.

    For the other stuff, it's working well so far although the transition of categories from one blog to another isn't as simple as it would seem in theory.

    I'm going to try to do the domains shortly and hopefully that will go well. I'm still not quite sure I understand how this works but will figure it out with your assistance. Domain mapping can be tricky... again, many thanks!

About this Topic