In this post I am going to explain how we can install PHP, Apache, and MySQL in Windows. Note I am not using Wamp server or XAMPP server. For this post, I explain you in simple steps to install everything step by step. For this tutorial I am using Window 10

Simple Steps to Install PHP, MySQL, and Apache

Steps to install MySQL server

1. Download MYSQL 8.0.13 from their official website  https://dev.mysql.com/downloads/mysql
2. Run the installer and  click next as shown below.

group selection after installing
3.  In Choosing a setup type screen choose server and click next.

4. If asked to install visual c++ then allow it to install else click on execute. Now wait for the installation to complete, then click next.

5. Type and Networking fill port information and click next.

6. In the Authentication Method select Legacy Authentication Method and click next.

7.  Now in next step enter your root password and click next.

8. On next screen for windows service Click Next and click execute then wait for a while for the system to apply configuration

Screenshot_2.png

9. After Applying configuration your MYSQL server is ready to use.

Steps to install and setup Apache on Window

1.  In this step we install APACHE, download Apache Lounge. You can download from their website
https://www.apachelounge.com/download/

2. Unzip files to C:\Apache24\  directory and open httpd.conf file.

3. Change #ServerName www.example.com:80 to ServerName localhost

4. Open a command prompt and  go to c:\Apache24\bin directory and type

installingApatche.png

5. Now open a browser and type http://localhost/ . it works!  will be displayed on the screen.

Step to Install PHP on Window

1. Now in this step, we install PHP So, first download it from their official website download Thread Safe zip file and unzip the under C:\php.

2. Now rename php-ini-development.ini to php.ini in C:\php and add system variable of php from This Pc => Properties=>Advance System Setting=> Path and add new path for an unzipped directory which is C:/php.

3. Now open C:\Apache24\conf\httpd.conf and add some lines into it at the end
PHPIniDir /PHP
AddHandler application/x-httpd-php .php
LoadModule php7_module /PHP/php7apache2_4.dllDirectoryIndex index.php
PHPIniDir /PHP
AddHandler application/x-httpd-php .php

4. Create a new file phpinfo.php under C:\Apache24\htdocs and restart apache service, then navigate to http://localhost/phpinfo.php if it displays like below screen then you are done with installation of php.phpversion.png

5. Next is to download phpmyadmin, you can download it from their official website https://www.phpmyadmin.net/downloads/ and unzip the file under C:\Apache24\htdocs/phpmyadmin

6. After extraction, you have to rename phpMyAdmin-4.8.3-all-languages to phpmyadmin. You are all set to use phpmyadmin as well. Now Navigate to http://localhost/phpmyadmin/ , If there is an error regarding extension is missing you can enable it from php.ini file.

Hope this post Help you setup PHP MySQL Apache on your Window OS. If you face any issue please comment below. Thanks, Happy Coding 🙂