WordPress.org

Ready to get started?Download WordPress

Forums

[closed] How to manage and upload multiple local WordPress sites? (18 posts)

  1. agmacdonald
    Member
    Posted 3 years ago #

    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.

  2. 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...

  3. agmacdonald
    Member
    Posted 3 years ago #

    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.

  4. 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.

  5. agmacdonald
    Member
    Posted 3 years ago #

    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.

  6. 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.

  7. 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.

  8. 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.

  9. agmacdonald
    Member
    Posted 3 years ago #

    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?

  10. 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).

  11. agmacdonald
    Member
    Posted 3 years ago #

    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?

  12. 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

  13. agmacdonald
    Member
    Posted 3 years ago #

    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/ ?

  14. 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.

  15. agmacdonald
    Member
    Posted 3 years ago #

    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.

  16. 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.

  17. presswp
    Member
    Posted 2 years ago #

    I have a single local site that is on my local machine. What is the process to upload this site to an already established multi-site wordpress server. Importing the xml file to the server isn't working that well since the majority of the work that I've done is lost. would ftp be the best option? if so, to which folder on the multi-site server should I upload my local site's wpcontent folder to ensure that the rest of the sites already existing on the server don't get messed-up? I hope I expressed myself clearly.
    Thank you

  18. presswp - This post in 9 months old, and you should make a new topic for yourself.

    When you do, please elaborate on this:

    Importing the xml file to the server isn't working that well since the majority of the work that I've done is lost.

    You should just be able to import the data. It's POSSIBLE the posts aren't bringing the images, since they're local, and your webserver can't see the local images. Which, if that was the case, I would say edit the xml file and change the URLs of all the images to what their FINAL URL will be (domain.com/foo/files/2011/11/bar.jpg for example) and then once that's done, upload the wp-content/uploads to the live site's wp-content/blogs.dir/#/files/

    Where # is the site ID for that sit.

Topic Closed

This topic has been closed to new replies.

About this Topic