How can i run the same WordPress install on multiple subdomains?

My site is installed on my main domain, lets say something.com for an example. I have WooCommerce installed and i would like to run the shop part of the site on store.something.com with the same WordPress install. Also, the blog would run on blog.something.com.

I think Multisite is not what i’m after based on the “Before You Create A Network” article in the Codex.

Read More

Is it possible to do this without installing multiple WordPress on the subdomains?

Related posts

3 comments

  1. WP multisite (subdomain) is the answer – http://codex.wordpress.org/Create_A_Network

    In addition you can install the WP Domain Mapping Plugin to run on other domains

    You need to decide whether you want WP multisite subdomain or sub-directory installation. WP subdomain does exactly what you want, but WP subdir + domain mapping plugin allows you to have both (subdomain AND sub-directory). WP subdomain looks like this:
    domain.com (main site)
    site1.domain.com
    site2.domain.com

    WP subdirectory looks like this:
    domain.com (main site)
    domain.com/site1
    domain.com/site2

    With WP Domain Mapping plugin you can map any subsite above to another domain, for example:
    site1.domain.com -> http://www.site1.com
    site2.domain.com -> http://www.site2.com
    [or]
    domain.com/site1 -> http://www.site1.com
    domain.com/site2 -> http://www.site2.com

  2. @passatgt, make some edit in your wp-config.php file:

    define( 'WP_ALLOW_MULTISITE', true );
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false); 
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/plug/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    

    after this edition you will see a ‘Network Setup’ option under ‘Tools’ menu in your wordpress dashboard. Follow the instruction you will be directed. edit your ‘.htaccess’ file in wordpress and finally you will be able to set multisite in your wordpress.

  3. Is it possible to do this without installing multiple WordPress on the subdomains.

    Unfortunately the answer is: no. It’s not possible to route various domains to different content nodes within one WordPress site. The reason is that WordPress handles URLs internally as constants (e.g. WP_CONTENT_URL which is build of to the siteurl option). So once they are set up, they can’t be changed any more.

    So even if there would be a really theoretical way, it would mean that you have to hack around every part that uses the constant WP_CONTENT_URL. I don’t think that this is a reliable way.

    Long story short, WordPress is not designed to deal with multiple host names within a single site. The only way to do that is the multisite feature. In fact, multisite is the hack that overcomes the issues with the constants by implementing a »sunrise« process that defines the constants according to a list of valid hosts in a database table (wp_blogs).

Comments are closed.