Can i install xampp and wampserver in same machine?

Hi I just want to ask, Is it possible to install xampp and wampserver in same machine or in one computer?..

Thank you in advance :slight_smile:

Hi jemz,

Yes you can, although you couldnā€™t run them both at the same time unless you changed the apache/mysql ports on one to prevent them conflicting. Having said that, I canā€™t see any advantage to running both.

Hi fretburner,

Thank you for the quick replyā€¦Okay i will just run them one at a time ,example if i want to run my project under the xampp so i will just run the xampp,and then when i want to run other project that is in the wampserver i should exit first the xampp to prevent conflictā€¦am i right?

:slight_smile:

Sure, you can doā€¦ but you know you can run multiple projects on a single server, right? You can set up virtual hosts so that you can have http://project1.localhost, http://project2.localhost, etc.

Yes you can Install wamp and xampp on same machine .

basically the trick is to change the port for the wamp apache server and mysql , by default apache listen on port 80 for browsers and mysql listen for port 3306

you need to change the port number for apache. now this thing requires two small changes in a file which is http.conf

this file is on two locations in wamp. one in apache location ā€œC:\wamp\bin\apache\apache*.*.**\confā€ where stars are basically the version number. open the file in any editor or notepad and search for this ā€œListen 80ā€ and change it with ā€œListen 9090ā€ that means now your server will listen on port number 9090 instead of default port.

the another line is also in the same file just search for this line ā€œServerName localhost:80ā€ and replace it with ā€œServerName localhost:9090ā€

Now change the port for mysql

now this is the second most important part. if you donā€™t do this you will be accessing the xampp mysql interface and engine which will make you confuse if you donā€™t know about it because then you will be thinking of adding your scripts in wamp so technically all the databases should be in the wamp as well but in reality the xampp server will take preference if xampp is already running and port is used from the xampp mysql. The wamp mysql will not start entirely and you will also get no problem with that because using the url ā€œlocalhost/phpmyadmin/ā€ will show the xampp phpmyadmin so to tackle this problem you have to change the mysql port to another number.

To do that you have to go the mysql location which is in my machine is like this ā€œC:\wamp\bin\mysql\mysql5.5.24ā€. open the file ā€œmy.iniā€ and find the line

port = 3306 and replace it with port = 3307

this will enable your wamp mysql to access along with xampp mysql due to different port address.

last part is to access the wamp mysql from wamp phpmyadmin interface. whenever you try to access phpmyadmin you will be seeing the xampp server or the one which is started first

to tackel that problem we need to make a small change in another area which is phpmyadmin interface code.

to do that go the location ā€œC:\wamp\apps\phpmyadmin3.5.1ā€ now phpmyadmin3.5.1 may be different according to your version but the things will be pretty much the same so to fix that problem find the file ā€œconfig.inc.phpā€

find these two lines

$cfg[ā€˜Serversā€™][$i][ā€˜verboseā€™] = ā€˜localhost:3306ā€™

;$cfg[ā€˜Serversā€™][$i][ā€˜hostā€™] = ā€˜localhost:3306ā€™;

and replace them with

$cfg[ā€˜Serversā€™][$i][ā€˜verboseā€™] = ā€˜localhost:3307ā€™;

$cfg[ā€˜Serversā€™][$i][ā€˜hostā€™] = ā€˜localhost:3307ā€™;

It is possible that you see these lines below

$cfg[ā€˜Serversā€™][$i][ā€˜verboseā€™] = ā€˜localhostā€™;

$cfg[ā€˜Serversā€™][$i][ā€˜hostā€™] = ā€˜localhostā€™;

so still replace them with lines below

$cfg[ā€˜Serversā€™][$i][ā€˜verboseā€™] = ā€˜localhost:3307ā€™;

$cfg[ā€˜Serversā€™][$i][ā€˜hostā€™] = ā€˜localhost:3307ā€™;

now when you access the phpmyadmin with wamp you will be accessing the wamp mysql engine

e.g if now we use the following url ā€œlocalhost:9090/phpmyadmin/ā€ you will access the wamp mysql along with wamp server

to access wamp server use ā€œlocalhost:9090/ā€

and for database connection string you have to use localhost:3307 for all your script from wordpress, joomla to magento

Hi sorry for the late replyā€¦ wow this is very detailed. okay i will let you know if this works for me.Thank you so much.:slight_smile:

Hi itā€™s working, Thank you so much :slight_smile:

Hi hosttriples, I have some problem in accessing the phpmyadmin in wampserver

#2002 - No connection could be made because the target machine actively refused it.

I followed your steps.

http://localhost:9090/phpmyadmin/

Hi hosttriples, Itā€™s okay now i replace all the lines port 3306 with 3307ā€¦:slight_smile:

Hi, I canā€™t navigate to the page using this http://localhost:9090/test/mysite

Hi sorry for my post againā€¦itā€™s working again i missed this line

$cfg[ā€˜Serversā€™][$i][ā€˜portā€™] = ā€˜ā€™;
itā€™s empty so i added 3307
it would be like this
$cfg[ā€˜Serversā€™][$i][ā€˜portā€™] = ā€˜3307ā€™;
and itā€™s working nowā€¦iā€™ll be back if i get in trouble.

Hello jemz,

Its good to see that your issue has been resolved . :slight_smile: