• Resolved cabplan

    (@cabplan)


    I have a question that is hopefully not too hard to answer, I have a multi-site up and running using a set of wp 4.1 core files. The files are setup using symlinks to the core files. I now want to setup another WP multi-site using the same wp 4.1 core files (so when I update symlinks for the site it is easily maintainable), but the issue I am starting to see is that the wp-config.php file has all the other credentials to the other site. I need this wp-config.php is the new multi-site to have different credentials/parameters. Is this possible to setup different wp-config.php files for different multi-sites installation using one WP core files?? Any help would be much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I need this wp-config.php is the new multi-site to have different credentials/parameters. Is this possible to setup different wp-config.php files for different multi-sites installation using one WP core files??

    Sure. Mind you this is not a great idea.

    if ( $_SERVER["HTTP_HOST"] == "example.com" ) {
    // All the config info for example.com
    }
    
    if ( $_SERVER["HTTP_HOST"] == "otherexample.com" ) {
    // All the config info for otherexample.com
    }

    Why do they need to be separate multisites?

    Also sharing files may cause sync issues with upgrades and plugins, so be very careful.

    Have you looked into setting up your site as a multinetwork site? There are plugins out there that make setting it up a breeze. Check out https://wordpress.org/plugins/wp-multi-network/

    Thread Starter cabplan

    (@cabplan)

    Hi Mike, so I would add these commands to the main wp-config.php file on the root level? What happens file I have a dev URL, would I have add that in as well?

    Thread Starter cabplan

    (@cabplan)

    Actually doing a little research, I was able to accomplish what I was trying to do from this article:

    http://jason.pureconcepts.net/2012/08/wordpress-multitenancy/

    This explained exactly what I needed to do in terms of setting up core WP files but also have unique wp-config files on lower levels of other instances.

    Another article I found useful was:
    http://viastudio.com/configuring-wordpress-multiple-environments/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple Multi-sites on one set of core files’ is closed to new replies.