How to restart apache from WampServer using a .bat file?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With