How to run Apache, MySQL, and PHP on windows platform?
As you all are aware of an open source technology called PHP that was developed to create dynamic websites. There are different content management systems (CMS) and frameworks based on PHP that the developers use for developing different websites wherein the management is handed over to the client.
Many people prefer these kinds of sites made in PHP because they feel secure when the site is in their court after the development is over. They do not need to contact the developer for small amendments on the website or uploading new stuff like blogs.
PHP was made to run on Linux environment because of the incompatibility with the Windows platform/IIS web server. Linux environments are not user-friendly as windows because of Terminal involvement. There is a lot to be done on the command prompt rather than GUI (graphical user interface) so the beginners or the developers feel uncomfortable in running apps in there.
Now the next question that arises is if there is a way to use PHP and its supported backend as well as the web server on windows?
Yes, there are several ways to do it.
The default method is using the Internet Information Services (IIS) which is a default web server offered by windows, however, installing PHP and configuring it is quite cumbersome. Anyone who is going to install PHP under IIS needs to have an understanding of module mapping that adds up as a prerequisite.
PHP runs the best with Apache as a web server and not IIS so now what needs to be done to clone the LAMP (Linux Apache MySQL PHP) on windows. There are tools like
- WAMP (Windows Apache MySQL PHP)
- MAMP (Mac Apache MySQL PHP)
- XAMP (X-OS Apache MySQL PHP)
That creates the same environment for PHP as on Linux. WAMP is a tool that runs on Windows operating system which is different from Linux but at least using Apache as a web server which is the most compatible application server to run PHP. You can say “PHP was made for Apache”.
If you want to use the exact same LAMP then you can go for the variation called XAMP.
The main advantage of using these tools are you do need to install the web server, PHP and backend individually instead you get everything in one package.
The easiest way to create a website for an example a WordPress website
- Download the WordPress package in a zip file or tar.gz package
- Go to the destination wherever you installed the WAMP tool
- Go to WAMP->WWW, create the folder for your website and extract all the files there
- Rum WAMP- Make sure that Apache and MySQL are turned on
- Type” localhost” in the browser to see the WAMP homepage.
- Open “phpMyAdmin” from there and create a new DB, its user and assign the privileges
- Now go back to your WAMP home page and click on the website folder you created under WWW. You will get the WordPress Installation Page, put in all the information required like the Database name, user, password, host, and prefix.
- Click on Next and then set the Admin ID and password for WordPress Administrator section. That is it.
- Go to localhost/website folder/wp-admin
If you face any issues while performing above steps, please feel free to contact us.