How to restart apache from WampServer using a .bat file?
Asked
Active
Viewed 6,252 times
2 Answers
4
Both Apache and MySQL run as a service ( by default ) so all you need to do is stop/start the service as you would from the command line.
The Apache service is called wampapache
and the MySQL service is called wampmysql
So in a batch file your would do :-
net stop wampmysql
net stop wampapache
net start wampmysql
net start wampapache
Of course you would have to run the batch file from a userid that has the privilages to stop and start services.
UPDATE for x64:
The Apache and MySQL services for 64-bit systems are called wampapache64
and wampapache64
, so the command should be
net stop wampapache64
net stop wampmysqld64

RiggsFolly
- 93,638
- 21
- 103
- 149