Apache Php Windows 10

As we know the Windows Subsystem for Linux 2 has its own Linux Kernel which makes it run various kinds of open source programs efficiently. Therefore, here we are with a tutorial to learn how to install LAMP stack (Apache, MySQL, and PHP including PhpMyAdmin) on WSL 2.

Create a PHP file and add the following line and save it as index.php in the htdocs folder in Apache installation directory. Php phpinfo;? Now double click the file to test. The output is as shown in the featured image of this article. See also: How to Install Apache Web Server on Windows 10; How to Install MySQL on Windows 10. Configure IIS, Skype and other software (optional) If you have a Professional or Server version of.

Apache Php Windows 10
  1. PHP 7 - Installation on Windows with Apache - To install Apache with PHP 5 on Windows follow the given steps. If your PHP and Apache versions are different then please take care accordingly.
  2. Now we have a fully running Apache, MySQL and PHP in our Windows 10 system. Visual Studio Code and PHP Extensions OK, now you need some tooling to develop your PHP applications.

LAMP stack which is also known as a Linux web server stack to run various web apps, CMS such as WordPress and more. Of course, if you are already using XAMPP on Windows 10, then there is a provision to change the default ports of Apache, PHP, and MySQL or MariaDB so that the LAMP on WSL 2 and one on XAMP can run together without interfering in each other’s services.

Why you should start using Apache web server or LAMP on WSL 2 instead of a Virtual machine?

The biggest reason to run the LAMP server on WSL 2 rather than using Virtual Machine on VirtualBox or VMware Player is the performance. As Windows Subsystem for Linux is tightly integrated into Windows 10 environment, thus the performance which we can get there will be much better than running some Linux VM. Furthermore, after the latest Windows update, now we can explore the Linux filesystem directly using the Windows explorer, even running of GUI applications on WSL 2 is possible.

Uncover the truth xenoblade chronicles 2. Another thing is WSL uses the Windows localhost or the same IP address which the system has, thus it easy to access the created webserver and web apps using the system browser, without much hassle.

Install LAMP server on WSL 2 or 1- Windows 10 subsystem for Linux
Start Apache and MySQL services

Install LAMP server on WSL 2 or 1- Windows 10 subsystem for Linux

The popular distribution available on Microsoft Store to download and use as WSL 1 or 2 is of course Ubuntu 18.04 or Ubuntu 20.04 LTS. You can choose any of them. However, before moving further make sure you already have installed WSL 1 to enable WSL 2. The steps given below will work for both versions.

Check out these two tutorials, if you haven’t had a Subsystem.

Run WSL Ubuntu 18.04 or 20.04 distro

Those are using it the first time, to run bash after installing, simply go to the Windows search box and type Ubuntu, as its icon appears, click that to run.

Apache php mariadb windows 10

Update system

Cara Install Apache Php Mysql Di Windows 10

After starting the program first time, it will be a good idea first we update its repo and packages, for that run the following two commands:

Apache php windows 10 pro

sudo apt upgrade

Install Apache. MySQL and PHP – Lamp Server

Now, to install the Lamp server, we can use the below given single command on WSL Linux instead of issuing one by one for each service to get configured on the system.

The above command will show the packages are going to install for Apache, MySQL, and PHP, accept them and let the system install the same.

Start Apache and MySQL services

Once the installation is completed, start the Apache and MySQL service using the below commands:

Secure and start MySQL:

To check Apache is running perfectly, open your browser and type: http://localhost

Install PhpMyAdmin

If you want to manage your MySQL created database efficiently then also install the open-source PHPMyAdmin for easy web database management user interface.

Download Apache Php Mysql Windows 10

When it asks you to configure the database, then follow the guided wizard. Here a few screenshots to give you a quick idea.