Setting up MultiSite on Windows using localhost...then changingin to domain name (10 posts)

  1. kansascoder
    Posted 5 years ago #


    While waiting for the networking folks to complete their work I'd like to go ahead and setup a network of WordPress on my windows box using localhost until the domain name gets put into place.

    When I click on Network under Tools I get the Network Details panel. In the Server Address line it says 'The internet address of your network will be localhost' I'd like to know if once I click install, and work on the sites under that, can I go back in later once the domain name is ready and change this to use my new domain name. What is involved in doing this? Are there many files and database modifications needed to use the domain name?


  2. Best way would be to use your hosts file


    Then you can point newdomain.com to your PC only for you, and thus, magically, it can be the real Earth all along!

  3. mattpickus
    Posted 5 years ago #

    Using the hosts file is s great work around, and one that I am definitely going to try!

    I want to create a test bed in WAMP for an installation that will migrate to a subdomain (not subdirectory) environment. The CODEX says:

    You cannot choose Sub-domain Install in the following cases:
    - WordPress install is in a directory (not in document root).
    - "WordPress address (URL)" is localhost.
    - "WordPress address (URL)" is IP address such as

    I assume that a hosts file deals with the last two issues, but what about the first. I am correct in thinking that the WWW folder in my WAMP install is considered the root? That is how it has been behaving for my stand alone installs so I should install WP directly under WWW?

    If I develop like this, am I correct that I can port everything to a hosted server with just these steps:

    1. FTP all the necessary files to the host at the same level relative to the root.
    2. Tweak the WP-Config to point at the correct SQL server.
    3. Export all SQL tables and then import them on the remote host

    Is there anything I need to do to my Apache config file on my local box to emulate the wildcard domains?

    Sorry for the newbie questions, but I am not that that familiar with UNIX type environments.

  4. You cannot choose Sub-domain Install in the following cases:
    - WordPress install is in a directory (not in document root).

    THat means if your install is in yourdomain.com/wordpress/ and you force it to answer to yourdomain.com. You can do this with single WP, not multi.

  5. mattpickus
    Posted 5 years ago #

    Yes, I got that and managed to get it running in WAMP. The host file works great to spoof the domain, the only tweak is that I need to add a line to hosts for each sub-domain (unless you know how to make a wildcard). I tried *.mydomain.com but it bypasses my localhost totally and tried to fetch http://www.mydomain.com from the external server.

    Multisite is pretty cool and will save me a lot of work with the network plugin management.

    Your "how to install" article on the WP Codex was invaluable!!!

  6. can't do wildcard subdomains on localhost, so yeah you gotta spoof some of the subs for testing.

    And thanks.

  7. kansascoder
    Posted 5 years ago #

    Back to my original post. When a network of sites is installed using localhost (or an ip or a domain name) as the Primary Domain there are entries made in the database in several tables that require changing. Using a host file doesn't help in this case, although that did help for us to reach the blog inside our network. Once we reached it I had lots of errors because WP was looking at the wp_site, wp_blogs and wp_options tables for informaiton on the urls. But IIS was no longer pointing to localhost. it was now using the domain name.

    It's been suggested elsewhere to do a dump of the database (using the mysqldump command - be sure to read the syntax at the mysql site for our specific version if you don't know it already) which creates a series of text files containing Create Statments and your data. This can be used to search and replace the domain names with your new domain name. This is probably the fastest way to do this but I chose to do update statments in the database and it took about an hour.

    I also had to make changes in the wp-config and to the header.php file inside my theme directory where a call to a local jquery file was being made (I think by default this is to a remotely hosted instance but we made it local).

    We had about 30 blogs setup but no posts. It was basically a fresh install. I would imagine that doing this kind of alteration on a blog with tens of thousands of posts would be impossible without stored procedures and dumping that amount of data via mysqldump, I'm guessing, would lead to a pretty big file to search and replace on.

    At any rate this issue has been resolved! Thanks to all who chimed in.

  8. If you make your fake domain in the hosts file first and then install WP & multisite, it does work. ;)

    And yes - the domain name is stored in all kinds of fun places and you need to change them all. (as you found out)

  9. mattpickus
    Posted 5 years ago #

    It is also helpful to have both a HOSTS file redirect and to create a virtual host in the Apache configuration. That creates a mirror the structure of your web server's folders beneath the WWW folder on the local host so that when you are done with development all you need do is to FTP everything under WWW to the root of the server and do an export/import of the SQL.

    If anybody ever invents a software that can manage all these things automatically they will become very rich.

  10. People already have?

Topic Closed

This topic has been closed to new replies.

About this Topic