Forums

Creating Project Management Site for Multiple Indep. Entities (2 posts)

  1. mciarlo
    Member
    Posted 3 years ago #

    Hi all,

    I want to create a site that will allow users to register and create their own 'project pages'. On these project pages will be a blog, and certain information about said project. Each project will be taggable and categorizable for easy searching, all on one domain.

    My question is - can this be done with WordPress? If so, how?

    Thanks!

  2. mciarlo
    Member
    Posted 3 years ago #

    So, it appears I would have to edit the wp-config file to select the correct database, if each project were on a unique subdomain.

    The code looks something like:


    $host = $_SERVER['HTTP_HOST'];
    $parts = explode('.',$host);
    if ($parts[3] = "") {
    $domain = $parts[0];
    } else {
    $domain = $parts[1];
    }

    switch ($domain) {
    case "domain1":
    $db = "database1";
    break;
    case "domain2":
    $db = "database2";
    break;
    }

    define('DB_NAME', $db);
    define('DB_USER', 'user');
    define('DB_PASSWORD', 'password');
    define('DB_HOST', 'hostname');

    Taken from here.

Topic Closed

This topic has been closed to new replies.

About this Topic