How to install and configure PHP on windows

Friday, 15th March 2019

This is our second lesson on PHP for beginners. This guide will walk you through the

·       Steps to install PHP on Windows.

·       How to configure PHP to work on windows.

·       Lastly how to start serving PHP projects on your local machine.

To install PHP on your local machine you have to follow these three simple steps

1.   Visit the official PHP website.

2.   Download the PHP version of your choice. Preferably the latest version. As of the time if writing this post the latest version is 7.2.

3.   Install the PHP desktop application you have downloaded.

The above step is very easy to follow if you already have Apache and MySQL server all installed on your local machine.

But if you don’t have all these installed you may encounter some glitches which may take you some time to sort out.

So as a beginner you will surely love the below procedure.

It’s very simple and easy. It will automatically install PHP, Apache, and MySQL for you. And one good thing you don’t have to set up any configuration to get started.

It’s really the best approach and it’s the most recommended.

How to automatically install a local server on your windows computer (PHP, Apache and MySQL)

In the above procedure we saw how to only download and install PHP on our computer but here we will cover how you can install a complete server on your computer.

If you are planning to install Apache, PHP and MySQL on Windows machine, then you can do so by following the below instructions.

This can be achieved by ready-to-use packages like WampServer, XAMPP, etc.

But in this tutorial, we will be covering the procedure to install XAMPP because that is the best for me as I first used WampServer and later on I switched to XAMPP when I get some more complex applications to run, though both of them are good.

XAMPP is a free open source software that provides an easy way for web designers and developers to install the necessary components to run PHP based software like WordPress, Drupal, Joomla, and others on Windows, Mac OS X, and Linux.

If you’re a web developer, designer, or a person trying to get into blogging, XAMPP will save you time and frustration having to manually install and configure Apache, MySQL, PHP, and Perl on your device to create a test environment.

To get started please it’s important that you read through all the instructions and later on take it one step at a time so that you didn't get any confusion as you proceed with the action.

STEPS TO INSTALL XAMPP ON WINDOWS

1.   Download XAMPP from apache friends’ website here. It’s preferable that you download the latest version if you are a beginner otherwise go with the version applicable to your PHP and MySQL project you are testing.

2.   Run the XAMPP executable you just downloaded. You will see the below warning.

xampp installation warning
xampp installation

 

3.   Click ok to accept and continue.

4.   XAMPP offers a variety of components that you can install, such as MySQL, phpMyAdmin, PHP, Apache, and more. For the most part, you will be using most of these components, as such, it’s recommended to leave the default options and click the Next button.

the best option to choose when installing xampp

5.   Use the default install location settings, or choose another folder to install the software, and click the Next button. It is recommended to leave the default installation location though changing has no known bug.

installation location for xampp

6.   Uncheck the Learn more about Bitnami for XAMPP option.

how to install xampp on windows

7.   Click the Next button.

8.   In case you see the below warning Click the Allow access button to allow the app through the firewall.

xampp installation warning allow host access

9.   After the install has completed, click finish to launch xampp control panel or open the XAMPP file using the short cut added to your home screen. In case you didn’t see the short cut added to home screen just click on the windows key and type XAMPP.

xampp controll panel after installation

10.                     Choose your language (English or German).

11.                     Click the Save button.

Once you’ve completed the steps, the XAMPP Control Panel will launch, and you can begin the web server environment configuration.

You can also click the Admin button to get access to the administration dashboard for each service and verify that everything is working correctly.

Now you can navigate to your browser to localhost.com anytime the xampp apache is on and if it works that means your installation has been perfect and you can now move on to the next tutorial.

xampp control panel

You have also gotten what is called local development environment which we will be using for the complete tutorial series.

Leave a Reply

RELATED POSTS


Total of 0 Comment