Running more than one site on localhost. (10 posts)

  1. jjsbetteroff
    Posted 3 years ago #

    Hi folks,

    im new to wordpress.

    I have xampp on my pc, and im building a site to then transfer it to my webhost. My question-is there any way for me to develop two separate sites simultaneously on my pc, so that when i pay my webhost i have them both ready to go live?

    So basically, i'm wondering if i can only develop one wordpress website on my local machine at a time through xampp.

    If i can do more than one, does anyone have any tutorials for this anywhere?

    Thank you very much for any help.

    Kind regards.

  2. Moving out of MultiSite as this is not a question about THAT but about running multiple, separate, installs locally.

    Answer: Generally yes. I know on MAMP if I put WordPress in multiple locations, I can call them all via localhost.

  3. Samuel B
    Posted 3 years ago #

    I have 3 installs at present

    just follow the same procedure for setting up the other sites except decide if you want separate db's or one

  4. jjsbetteroff
    Posted 3 years ago #

    Hi guys, thank you so much for replying.

    Samuel- when you say follow the same procedure- what exactly do you mean?
    ie, do i reinstall wordpress on the pc along with xampp? (sorry if this seems like a stupid question :-) )

    i dont suppose you could point me towards a tutorial or anything could you? Especially the separate database stuff you mentioned as i havent really got much of a clue about this stuff.

    Thanks again guys

  5. Just install WordPress again, not xampp.

  6. Samuel B
    Posted 3 years ago #

    yes as stated above
    just create another folder and put the wordpress files in there
    adjust your wp-config.php to reflect a different db or same one with differing table prefix
    run install routine

  7. Steveorevo
    Posted 3 years ago #

    You can use the free Duplicator plugin in the repository to deploy your site. It is pretty straight forward and I've had decent results with it. Actually, I haven't had any problems with it :-)

    Usually I use WP DB migrate, and I know there are other premium solutions but my vote is for Duplicator.

  8. Shea Bunge
    Posted 3 years ago #

    Instead of having lots of WordPress installs, I just set up my original one to use MultiSite. http://codex.wordpress.org/Create_A_Network.

    Just add define('WP_ALLOW_MULTISITE', true); to wp-config.php, and follow the instructions found in Tools >> Network Setup to install it.

  9. New Nine Media
    Posted 3 years ago #

    Absolutely! I have 35 sites on one multisite installation, and about ten more individual sites -- some WordPress, some not -- all on my local machine. At any given time, you can add or remove sites with ease.

    You need two things:

    1. create Virtual Directories in your Apache configuration file
    2. add or remove entries in your Windows hosts file

    Your virtual directories can point to any folder on your system (in general) so each folder can act like a new/different server. Give each virtual directory a servername/alias and then add that name/alias to your hosts file. If this is Greek to you, simply Google virtual hosts and windows hosts file to learn how to do it.

    Side note: You don't have to call them all "localhost". You can name them however you want, even using the live URL. For example, if I'm building http://www.xyzsite.com, I create a folder in my "Sites" folder (located in My Documents, though I'm on a Mac). Then, I create a virtual host to point to that folder, with an alias of http://www.xyzsite.com. Finally, I update my hosts file to point http://www.xyzsite.com to my local IP address. When I open http://www.xyzsite.com in my browser, it loads up the site/files on my local machine.

    When I'm ready to go live, I simply upload the files and database and it's live -- no messing with search and replace, changing URLs in the database or content, etc.

  10. Steveorevo
    Posted 3 years ago #

    DesktopServer Limited for free at http://serverpress.com/products/desktopserver does all that automatically

    But it does inhibit the top-level domain to be just .dev (as in development) in order to not confuse developers and maintain security.

Topic Closed

This topic has been closed to new replies.

About this Topic