-3

I want to host more WP sites on WAMP server at the same time.

How to do that?

  • You need to create a Virtual Host for each site. See [this answer to help you get started with that](https://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618) – RiggsFolly Jul 02 '17 at 17:09

2 Answers2

0

YES. You can make sub-folders in www and make different WP websites. But be careful with the database configuration. Installing WP does nothing but coping some PHP files to that specific folder. All the data is saved in database and inside that specific folder itself (E.g. config php files).

Shanil Fernando
  • 1,302
  • 11
  • 13
  • If you have only one domain and you have hosted your website in a hosting service, there if no any other way since you have only access for the one public folder in hosting service provider. – Shanil Fernando Jul 02 '17 at 08:23
  • I have more domains and I want to host more websites on my computer. –  Jul 03 '17 at 06:34
  • Are you really thinking going online with WAMP? I strongly recommend you NOT to go production version online with WAMP or XAMPP. They are suitable for development and testing. Not for production. For example, if you did not configure it correctly, your myphpadmin will be visible to Internet. Be careful. – Shanil Fernando Jul 03 '17 at 07:01
  • Should I buy hosting for production instead of WAMP or XAMPP? –  Jul 04 '17 at 05:57
  • No. You can build your own server or use a cloud service. Hosting is only a one solution. If you use a cloud service or hosting service, they will manage all software updates and security patches. if you build your self a server, then you will need to handle all of these by your self. – Shanil Fernando Jul 04 '17 at 16:54
0

I would recommend you to download XAMPP. Basically WordPress is built on PHP and XAMPP has support for PHP. First download it and configure it then go to the installation directory and go to xampp>htdocs> then make a new folder 'project' and then unzip the WordPress files in that folder. After that read the manual provided ant xampp's website and follow it. Basically you can build your WordPress website on Xampp.

EDIT Oh sorry for not understanding the question properly.

Now do this.

step 1: host the different websites in htdocs/ folder in xampp. You can host many websites as you want.

step 2: Then go to xampp/apache/conf/httpd.conf and uncomment the line which says this. For uncomment delete the '#' character.

Include conf/extra/httpd-vhosts.conf

step 3: Go to xampp/apache/conf/extra/httpd-vhosts.conf
Create the setup like this

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/xampp"
ServerName xampp
#ServerAlias
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/site1"
ServerName site1.com
ServerAlias www.site1.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/site2"
ServerName site2.com
ServerAlias www.site2.com
</VirtualHost>
Zaid Khan
  • 357
  • 4
  • 14
  • 1
    I don't think he is asking how to host a WP website. As my understanding he is asking how to host two WP websites in one server – Shanil Fernando Jul 02 '17 at 08:25
  • And the OP is using WAMPServer, basically the same as XAMPP, but more flexible. So why should they change to XAMPP – RiggsFolly Jul 02 '17 at 17:11
  • Thanks for all answers. I was just asking how to host more websites on single computer. –  Jul 02 '17 at 17:30