• I am trying to determine the best strategy for working on, and eventually uploading 3 local WordPress sites to be hosted within their own sub-folders on the same domain (eg: http://www.host.com/site1/, http://www.host.com/site2/). I have starting using the multi site functionality within a single WordPress install, but thought it might prove challenging bringing all sites together remotely. I am also using one database with 3 table prefixes, but I can use separate databases if that helps.

    Can someone suggest which of the following methods (or any other) might be best suited to managing and uploading multiple WordPress sites?

    Option #1: One local WordPress install using Multi Site option, with 3 separate sites created within WordPress

    Option #2: Three separate local WordPress installs (using separate folders under the WAMP\www folder

    At present I am using a single local database with three unique table prefixes (wp_, wp2_, wp3_). However I am not opposed to using three separate databases if that helps, as my hosting company allows it. Any differences in importing one database for 3 sites vs. importing 3 separate databases for 3 separate sites?

    What scenarios would make it easier to manage and upload three local WordPress sites? Am I going to run into potential hurdles if I continue to use the multi-site options from one WordPress install? Would I be better served to create a separate install of WordPress for each local site?

    I would appreciate any help, as I want to ensure that I am going about this properly.

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I’d be inclined to option 1.

    Setup a MultiSite on your local host, but change your PC so you can go to domain.com and have that point to your LOCAL pc instead of the version on teh web. That way, you can use the ‘real’ URL and when you go to upload to the web, it’s less to change.

    Andrea probably remembers where the directions on that are, I’m blanking…

    Thread Starter agmacdonald

    (@agmacdonald)

    Thanks for the quick reply Ipstenu. I am not sure I follow you when you say to change your PC so you can go to domain.com and have that point to your LOCAL pc instead of the version on teh web. If you and/or Andrea has any additional information on this, that would be most helpful.

    Also, can I get your opinion on databases in this situation? Am I ok going forward with all 3 sites in the same database? Would/could it be easier to separate the sites with each having their own database?

    Thank-you.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Am I ok going forward with all 3 sites in the same database?

    Yep 🙂 If you’re using MultiSite, that’s the default anyway.

    One of the gotchas with multiSite is that moving it is a bitch.

    Per this older post, what you want is to edit your host file to point domain.com to your local PC. http://wpcandy.com/teaches/how-to-install-wordpress-locally-on-a-mac has some details for a mac.

    Thread Starter agmacdonald

    (@agmacdonald)

    From what I have read, making changes to the hosts file would look something like this:
    127.0.0.1 mydomain.com

    Can I configure the hosts file somehow so that I can browse all 3 sites locally, but using the “mapped” domain?

    Also, how do I move the multi site WordPress files to my remote server, and how do I “map” my 3 local sites to their respective domain sub-folders here:

    mydomain.com/site1/
    mydomain.com/site2/
    mydomain.com/site3/

    Any other help would be appreciated.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    You’re overthinking 🙂

    Once you map your domain, then you just install WordPress on your local server via MAMP or LAMP or what have you. WordPress handles the rest.

    Mind, you don’t HAVE to do this. If you want, you can just install MultiSite on your domain and have at live from day one.

    Also, how do I move the multi site WordPress files to my remote server, and how do I “map” my 3 local sites to their respective domain sub-folders here:

    You add those other domains to your hosts file as well.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    You don’t have to map subfolders, though, just the domains. Unless we’re talking domain mapping which is a whole different kettle of eels.

    Thread Starter agmacdonald

    (@agmacdonald)

    I’ll have to look elsewhere for more information, as this is still not clear to me. In order for me to browse my 3 local sites created using a single WordPress install (by enabling multi site), how would I configure my hosts file? Like this: 127.0.0.1 localhost site1 site2 site3 ? Do I need to use any extensions like .local?

    Shouldn’t I also be configuring the httpd.conf file as well as the httpd-vhosts.conf file? That’s where I get lost, because in the vhosts file, it looks like it wants separate folder paths for each mapped virtual name, but they don’t exist in the WordPress multi site creation.

    It might be easier for me to do 3 separate installs of WordPress in 3 folders, each with their own database. This might eliminate some of the headaches. Any thoughts?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Well … it depends what you want. When you say ‘local’ we assume you mean ‘installed on my PC, not on a server’

    If what you want is to just go to your server, install WordPress, and have a day, then ignore all the hosts crap and just go for it.

    (The folders will never exist for Multisite, they’re virtual).

    Thread Starter agmacdonald

    (@agmacdonald)

    What I want is to find a way to create and update 3 WordPress sites on my computer, and then upload them to their respective sub-folders on my domain. If I simply FTP all my WP files and import the SQL database, will my server behave the same way as my local computer for browsing to a particular site? For example, locally, to access any of my sites I type in http://localhost/site1 or http://localhost/site2. When these are uploaded, will this work similarly on the web server, so that I can type in http://www.mydomain.com/site1 and the same for site2? Will WP carry over the virtual sub-folders?

    no no no no no.

    you will not need to make any vhosts entries for subfolder sites. they are *virtual*.

    Yes, you are *way* over-thinking this.

    Set up one line in your hsots file, that’s it.

    127.0.0.1 localhost

    Make sure mod_rewrite is enabled. THAT is what shows the sub sites.

    Just go do it. It works. I promise.

    Edit: also see this ->

    http://wpcandy.com/teaches/how-to-install-wordpress-locally-on-a-mac

    Thread Starter agmacdonald

    (@agmacdonald)

    I have enabled the hosts file change as you indicated, and that allows me to access my three local websites here: http://localhost/site1/, etc..
    The part I am not sure about is uploading the local WordPress and MySQL files to my domain name web server. Will the three local sites work the same way on my domain name, such as http://www.mydomain.com/site1/ ?

    If you had installed multisite on the web server, yes, they work the same way.

    But moving your local dev install online is not the same process as single WP. you have to do a find & replace on the db before syncing up.

    Thread Starter agmacdonald

    (@agmacdonald)

    Your answers have all been so quick, which I am very grateful for. Unfortunately for me, they are somewhat brief and a little vague, and I am left with more questions…

    In order for WP multi site to work on my web server the SAME way it is working now locally, what do I have to do in terms of file ftp, database import, and any changes that I would need to make to remote files?

    Thanks.

    Like I said above – do a dump of the db locally, find and replace the old local domain with the new live site domain.

    Put that on the live site.

    FTP up any changed or uploaded files from your local box to the live site.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘How to manage and upload multiple local WordPress sites?’ is closed to new replies.