Tech Zone

How to install Apache, PHP, and MYSQL on Windows 11 Machine

2 Mins read
How-to-install-Apache-PHP-MYSQL-on-Windows-10-Machine

If you are planning to install Apache, PHP, and MySQL on Windows 11 machine, then first, you have to decide as to which version of each application will be installed.

  • Apache 2.4.54
  • MySQL 8.0.31
  • PHP 8.2

You can download the required installer via links given below:

How to install Apache, PHP, and MYSQL on Windows 11 Machine

First, we have to decide as to which version of each application will be installed.

  • Apache 2.4.54
  • MySQL 8.0.31
  • PHP 8.2

You can download the required installer via links given below:

Apache 2.4.54 Installation on Windows 11 Pro 64 bit:

https://httpd.apache.org/download.cgi#apache24

  • Install the latestC++ Redistributable Visual Studio 2019: 

https://www.microsoft.com/en-in/download/details.aspx?id=48145

Apache 2.4.54 Installation on Windows 11 Pro 64 bit
Apache 2.4.54 Installation on Windows 11 Pro 64 bit
  • Download Apache 2.4.54
Apache 2.4.54 Installation
  • Download Apache files and unzip them (archive httpd-2.4.54-win64-VC14.zip) to the C:\Apache24\ directory:
  • After unzipping, go to the folder c:\Apache24\conf\ and open the httpd.conf file by any text editor.
Apache 2.4.54 Installation
Apache 2.4.54 Installation
  • Change below line in this file:

#ServerName www.example.com:80

ServerName localhost

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be “All”, “None”, or any combination of the keywords:

#   AllowOverride FileInfo AuthConfig Limit

AllowOverride None

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be “All”, “None”, or any combination of the keywords:

#   AllowOverride FileInfo AuthConfig Limit

AllowOverride All

#LoadModule rewrite_module modules/mod_rewrite.so

LoadModule rewrite_module modules/mod_rewrite.so

  • Register Apache service:
Register Apache Service
Register Apache Service

If you see this page, it means that your Apache installation has been successfully done.

You can modify index page code or upload your files like the given example below.

Apache 2.4.54 Installation

PHP Installation on Windows11:

https://www.php.net/downloads.php

PHP Installation on Windows11

Download zip file

PHP Installation
PHP Installation on Windows11
  • Rename php-ini-development.ini to php.ini
  • Add PHP in a system environment variable.

C:\>setx path “%PATH%, C:\php82” /M

  • Again, open the file c:\Apache24\conf\httpd.conf and append it with lines:

PHPIniDir “C:/PHP82”

  • AddHandler application/x-httpd-php .php

LoadModule php8_module “C:/PHP82/php8apache2_4.dll”

PHP Installation
PHP Installation on Windows11
  • Restart Apache services.

MySQL Installation on Windows 11 Pro 64 bit:

MySQL Installation on Windows 11 Pro 64 bit
  • Select Server Only and click on Next.
MySQL Installation
  • It will ask you to install Visual Studio 2019 on your system.
  • Click on the Execute button.
MySQL Installation on Windows 11 Pro 64 bit
  • Select License Agreement and then click on Next.
MySQL Installation on Windows 11 Pro 64
  • Click on Close
MySQL Installation on Windows 11
  • Click Next
MySQL Installation on Windows 11 Pro 64 bit
MySQL Installation on Windows 11 Pro 64 bit
  • Click on Execute button
  • Click Next button
MySQL Installation
  • Select Server Computer
MySQL Installation on Windows 11 Pro
  • Put root user password. Confirm password and Click on Next.
MySQL Installation on Windows
  • Click on Next button
MySQL Installation on Windows 11 Pro 64 bit
  • Click on Execute Button
MySQL Installation on Windows 11 Pro 64 bit
  • Click on Finish button
MySQL Installation on Windows 11 Pro 64 bit

That’s it! You’re done 🙂

Planning to install Apache, PHP, and MySQL? Choose VPS and pick any plan from https://www.znetlive.com/vps-hosting-windows/ 

Update: This post has been updated with latest information on 6th Jan, 2023.

“Acronis is directly responsible for saving our company 1200 hours per year for IT operations staff in backup and recovery workflows.” CIO, high performance IT company.
Read details in a report by Forrester.

Services ZNetLive offers:

Domain Names India

Shared Hosting India

WordPress Hosting India

VPS Hosting India

Dedicated Server India

If you have any doubt regarding this write-up or need to know more about the installation, drop comments below and get in touch.

6 posts

Umesh Dubey

About author
Umesh, Team Lead - Technical, is a Microsoft products’ expert with enviable certifications like RHCE, MCPS, MCSA and MCSE. An excellent team player, he utilizes his expertise of over 7 years in the technical sphere to handle technical issues brilliantly and dedicatedly value adds to the system administration and management fields. He can be seen drawing or playing chess in free time.
Articles
Related posts
Cloud HostingTech Zone

How can virtualization help your business save money and improve efficiency

4 Mins read
Expanding technology infrastructure can strain business budgets due to expensive hardware purchases. Virtualization solutions offer a revolutionary alternative, allowing companies to create…
G SuiteTech Zone

Comparing Google Workspace plans and pricing: Which plan is right for you?

4 Mins read
When it comes to evaluating productivity platforms from the business point of view, Google Workplace stands out from others. The suite is…
Microsoft 365Security TipsTech ZoneWordPress Guide

Why securing Microsoft 365 is essential: 8 key points

3 Mins read
Microsoft 365 has been a popular target for threat actors, with 74% of small and mid-sized Indian businesses reporting ransomware attacks in…

78 Comments