Hello, everyone welcomes back to new post in PHP tutorials. In the previous lecture, you had learned Introduction to PHP and we told you that we will study how to install PHP in next tutorial. So, today in this tutorial we will tell you how to install PHP XAMPP in your System. First of all my request to you is that if you have not seen the previous lecture, please have a look at that first and then continue with this chapter.
As you know PHP is server-side scripting language and it runs only on a server. If you don’t have any hosting and you are beginner then you may practice on Local Server also we said sometimes localhost.
Table of Contents
HOW TO INSTALL PHP?
Before starting with PHP, it’s important that you should know how to install PHP on your local system, so you can start coding right away.
Many PHP developers like to build their websites and test on local servers before publishing to the real server. To build a local web server environment on Windows computers, you can use XAMMP for Windows. In this guide, we will introduce the great free tool XAMPP which is developed by Apache Friend, now the most popular PHP development environment for Windows, Mac OS X & Linux. XAMPP is a completely free, easy to install Apache distribution containing MySQL, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and use. Check out below instructions, see how to install XAMPP on Windows computers.
The installation needs setting up the web server first. For that, you need to download the latest version of XAMMP Here.
Note: XAMPP is a package that includes the Apache web server, MySQL, PHP, Perl, an FTP server and phpMyAdmin.
How to Install XAMPP on Windows PC?
Why use XAMPP for Windows?
- The most popular PHP dev package
- For Windows 10, 8, 7, Vista, XP
- Containing MySQL, PHP, and Perl
- Easy installation and configuration
- Completely free of charge
We will break down into details of each step with screenshots and references. If you want to create a local server environment for testing websites before uploading to a web hosting account, check out the easy steps below.
Install XAMPP for Windows
Step 1: Download the appropriate Version of XAMPP
XAMPP comes with the different version for Windows, Mac, and Linux. Click on Download, and download the XAMPP 7.2.1 (with PHP 7.2) for windows, if you are using any of the window other than Window 2003& XP.
But if you are window 2003 or XP user Download the XAMPP 1.8.3 (with PHP 5.5), Since the latest version doesn’t support Window 2003 or Window XP.
Note: If you need XAMPP for WordPresss, the latest WordPress 4.9.2 requires PHP version 5.2.4 or greater. So both XAMPP for Windows 5.5.33 and XAMPP for Windows V 5.6.9 will work with the latest WordPress.
Step 2: Run the XAMPP setup wizard
Double click on the downloaded file and run the setup wizard. You will see a welcome screen, Click Next to Proceed
Step 3: Select the components
Apache and PHP are marked Grey, they are essential to run XAMPP local Apache server on your PC, so you can’t disable them. Other options are optional.
Make sure that you select the MySQL server and PhpMyAdmin in the XAMPP components selecting screen or you can select all options in the list.
Why do we require MySQL and phpMyAdmin?
Since most CMS or dynamic websites requires a MySQL database, so we have to enable MySQL. XAMPP offers phpMyAdmin, the free tool to manage MySQL databases. When you select and install MySQL database in the custom installation of XAMPP on Windows computer, so will the phpMyAdmin be installed.
Step 4: Select the Installation Directory
XAMPP files will be saved to a directory on your hard disk with the websites included. You will have the option to select an existing folder or create a new folder to save all XAMPP files.
Click Next and your local Apache server with PHP support, MySQL server with phpMyAdmin tool has been set up.
Congratulations, you have successfully installed XAMPP on a Windows PC. You can go to building your websites and host them on your local XAMPP server now.
Bonus Step: Create MySQL Database in XAMPP
Start up XAMPP, you will open the XAMPP control panel as below. Click to start both Apache and MySQL. We are now going to create the MySQL database for the local web applications installed on Windows, such as local WordPress site setup, local Joomla site setup, etc.
Now open your Browser and type localhost/phpmyadmin, admin panel is in front of you, here you can create your database. Click on new to create new database shown in below screenshot:
So this is for today, in our next tutorial we will learn about variable scopes in PHP and Data Types in PHP. Stay connected with us for more tutorials.
If you like this tutorial please share it with your friends, colleagues and with your relatives, keep visiting and be a part of the Tekraze family. If you have any problem with this tutorial please comment in the comment box and if you have any suggestion regarding this then please tell us.