How to Install PHP on Windows with Xampp


How to install PHP on Windows with Xampp? If you want to be a web developer, you must know about it. Because it’s the basic thing for you, as you know PHP is the most used web development language. WordPress, Joomla, Laravel, Gsmarena.com and much more websites using PHP for web development. If you browse a website and click some links, you can see .php extension. Where ever you will see .php extension, it means that website is built on PHP. So that it’s most important for you to know that, how to install PHP on Windows with Xampp? How to do this, I will show in this post, just read it to the end.

Install PHP on Windows

Install PHP on Windows 10 with Xampp:

Friends as you know Windows 10 is widely used version these days. According to the Verge more than one billion PCs are powered with Windows 10. While Microsoft claims more than 400 million active users of Windows 10, It’s four times popular than Apple’s Mac.

Download Xampp:

Just download the Xampp from apachefriends.org/download.html, but remember that, you need to download a copy of Xampp according to your Windows operating system. If your Windows is running on 32 bit, you should download 32 bit application of Xampp. If your Windows is running on 64 bit, you should download Xampp in 64 bit too for better performance.

Run Xampp Set Up File:

After downloading Xampp, run Xampp set up file with all packages includes Apache, MySQL, Filezilla, Murcury and Tomcat. After completion of installation, go to start menu and type keyword Xampp and click on Xampp Control Panel to launch Xampp Control Panel.

Start Apache Server:

Now start Apache server to run PHP script on Windows.

Default Folder for Web Server:

Now you have installed Xampp in your PC, the next step is to check web server, it’s properly running or not? by default the location of web server i.e. main folder of your offline website is as follow,

c:/xampp/htdocs

What ever page you want to make part of your website you need to put in the above mentioned folder. Whether you have created your web page in PHP like welcome.php, in HTML like welome.html, in HTM like welcome.htm or in ASP such as welcome.asp, you should move it to the main folder of your offline website mean to the above mentioned folder. Suppose you have created a page with name a welcome.php with following php codes.

<?php 
echo "Hello everyone are welcome in newly installed Xampp and PHP";
?>

Check Windows Supports PHP Script:

Open up any web client like Firefox, Chrome, Opera, Safari or any other and type the following line and press enter button from keyboard.

http://localhost/welcome.php

The out put of this page will be as follows:

Hello everyone are welcome in newly installed Xampp and PHP

If you see the output as follow it means something wrong.

<?php 
echo "Hello everyone are welcome in newly installed Xampp and PHP";
?>

Friends if your Windows does not support PHP script it means PHP is not configured in Windows. You must configure PHP in Windows, how to do this, don’t worry, just read my post how to configure PHP in Windows with Xampp

Dear friends do you know, you can shorten your URL in PHP too, If you want to learn about shortening URLs with PHP, I suggest you this post, just read it and learn more about shortening URLs with PHP. Top 20 PHP URL Shortening Scripts


Leave a Reply

Your email address will not be published. Required fields are marked *