Support » Networking WordPress » WordPress Multisite Local Development

  • Resolved marek91

    (@marek91)


    Hello,
    I have been trying for some time now to enable the multisite feature on a locally installed wordpress site. I have used MS WebMatrix, XAMPP, and most recently Desktop Server from Server Press…all on Windows 7. I managed to get it working on Desktop Server by adding a virtual host to the .httpd-vhosts.conf but once I restarted my computer Desktop Server deleted my added code and even the domain I added to the hosts file.

    Anyways I was wondering if anyone had successfully configured the multisite feature on their system – locally, and if so;

    • what program you did you use?
    • how did you configure the server?

    Any help would be greatly appreciated

Viewing 11 replies - 1 through 11 (of 11 total)
  • XAAmp is the most reliable on Windows.

    Just follow the instructions for setting up wordpress normally. give it a fake domain in your hosts file and remember you cannot do wildcard subdomains locally.

    that’s it.

    Thanks for the reply Andrea_r.
    The last time I installed Xampp the location of the wordpress url was something like http://localhost/wordpress, from there I set up the multisite feature as per usual and selected to make the network under sub-directories as it wouldn’t let me make it under sub-domains. Now I did attempt to add a fake domain like localhost/wordpress/site1 to the hosts file. But since you aren’t allowed any / ‘s in the hosts file I couldn’t.

    So I guess my question is this: is there any way I could set up Xampp so that my main site url would be something like http://wordpress i.e. without the localhost.

    Also, when you add a fake domain to the hosts file is there anything that should be added or uncommented in the .httpd and .httpd-vhosts files in apache?

    I greatly appreciate your help on this.

    Ok so I figured out how to change ‘localhost’ to any domain name. That is I can access http://localhost/wordpress using http://wordpress. However what I’m wondering is if I were to access this ‘mirror’ site http://wordpress and login as an administrator, would wordpress multisite allow me to add a new subdomain like http://site1.wordpress.

    Basically what I’m curious of is say I added this mirror domain. I would have two domains and one installation of wordpress (sharing the same wp-config file and such). If I enabled the multisite feature would wordpress view me as http://localhost/wordpress or http://wordpress?

    I’m aware that all this can be found out by installing Xampp and testing these things out. But it would save me a lot of time if someone with experience in this could help me out.

    I don’t use XAMPP, but for testing purposes I have a local WordPress multisite network using a mixture of domains and subdomains on Windows.

    WordPress doesn’t have a view about who you are. It only parses whatever URL you use. If your network is set up to use “sub-domains” then WordPress uses the entire domain (not just the subdomain, even if there is one) to determine which site to display. Therefore http://wordpress will give you the site whose domain is wordpress, if there is one. And http://localhost/wordpress will give you the wordpress page in the site whose domain is localhost, if there is one.

    I actually prefer to use a full fake tlds because the lack of an extension when you get to subdomain.localhost can cause some weird things.

    I use .loc for local stuff, just to be obvious. 😀

    wordpress.loc
    myothersite.loc
    wp.loc

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    Also using LOC means if I search/replace domain.loc with domain.com, I won’t screw up serialization (Thank you, Ron).

    If your TLD is mydomain.co.uk, I would use mydomain.co.lc or something.

    Thanks to all for your replies.

    So I have my wordpress installation configured so I can reach it via:

    http://wordpress.dev

    I went through all the proper instructions and I set up the multisite feature.

    Now I added:

    127.0.0.1 site1.wordpress.dev to the hosts file.

    I added via network admin dashboard a new site which I of course named site1.wordpress.dev. Now when I click to go to the dashboard of site1.wordpress.dev I reach an error page.

    This is leaving me thinking that I should add a virtual host named site1.wordpress.dev to the httpd-vhosts.config file in apache.

    Here’s the problem…If I define document root as:

    DocumentRoot “C:/xampp/htdocs/wordpress

    then site1.wordpress.dev will be an exact copy of wordpress.dev.

    How can I set this up so that site1.wordpress.dev is a new wordpress site not just a copy of wordpress.dev.

    This is leaving me thinking that I should add a virtual host named site1.wordpress.dev to the httpd-vhosts.config file in apache.

    Add a ServerAlias to the vhost for wordpress.dev.

    And even if you added a new vhost – yes it will be an exact copy of the *files* but wordpress sorts it out internally. Everything points to one folder. Kinda the point. 😉

    Hello Andrea_r

    Thank you I opted to just add it the ServerAlias way as you suggested. What confuses me is they are exactly the same up until you change the theme on one of the sites. I expected there to be some different welcome page or something.

    Anyways thank you again for your time.

    The same default blog is applied to all sites.

    Would anyone be willing to write a how-to for XAMPP on Windows to get the desired domain name of example.com instead of localhost/example/ ?

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘WordPress Multisite Local Development’ is closed to new replies.