PHP Installation in Local Server Using XAMPP (With Video)
You can start learning the basics of programming in PHP with the help of any of the online PHP compilers freely available on the Internet. This will help you get acquainted with the features of PHP without installing it on your computer. Later on, you can install a full-fledged PHP environment on your local machine.
Software Components of XAMPP
XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends. It includes key components required to run PHP-based web applications locally.
-
Apache – Acts as the main web server that processes HTTP requests. It's the default server bundled in XAMPP and is widely used globally.
-
MySQL – Serves as the database management system in XAMPP. It's open-source, fast, and reliable for managing structured data.
-
PHP – A powerful server-side scripting language used for developing dynamic websites and applications. It works seamlessly with MySQL and is embedded into HTML.
-
Perl – A high-level programming language focused on text processing and is often used in web development and system administration.
Steps to Install XAMPP on Windows
-
Download XAMPP
Visit the official Apache Friends website and download the installer for XAMPP (recommended: version 7.4). -
Run the Installer
Open the downloaded file and proceed with the installation. You can leave the default components selected (MySQL, PHP, phpMyAdmin) and click Next. -
Bitnami Option
Uncheck the option “Learn more about Bitnami for XAMPP” and proceed by clicking Next. -
Choose Installation Folder
Set the root installation path (e.g.,C:\xampp). This will be the base directory that includes thehtdocsfolder where your projects will reside. -
Firewall Access
Allow XAMPP to pass through Windows Firewall when prompted. -
Finish Setup
After the installation, click Finish to complete the setup and launch the XAMPP Control Panel. -
Start Apache & MySQL
In the control panel, click Start beside Apache and MySQL to start the local server.Note: If Apache doesn’t start, another service might be using port 80. You may need to stop that service or change the Apache port in the config.
Testing Your Local Server
-
Visit Localhost
Open your browser and type:
http://localhost
If XAMPP is installed correctly, the XAMPP welcome page will be displayed. -
Create a PHP File
Go to the folderC:\xampp\htdocs, and create a new file calledtest.php. Paste the following code: -
Run the PHP Script
Open your browser and go to:
http://localhost/test.php
If you see the PHP information page, then PHP is working correctly in your local server.
Project Folder Structure
To organize your projects:
-
Inside the
htdocsfolder, create a sub-folder (e.g.,learning) -
Create a file like
helloWorld.phpinside that folder -
Access it via
http://localhost/learning/helloWorld.php
Web servers usually look for an
index.phporindex.htmlfile as the default landing page.
Watch the Video Tutorial
For a complete walkthrough of installing XAMPP 7.4, configuring Sublime Text, and verifying PHP using phpinfo(), check out the video tutorial:
Configuration Tips
-
All configuration files are located inside:
C:\xampp\apache,C:\xampp\mysql, andC:\xampp\php -
Restart Apache or MySQL after making changes to config files.
13 Comment(s)
I will immediately clutch your rss feed as I can not find your email subscription link or newsletter service. Do you have any? Kindly let me recognize in order that I may just subscribe. Thanks.
Way cool! Some very valid points! I appreciate you writing this article and also the rest of the website is also very good.
I am sure this article has touched all the internet users, its really really nice article on building up new web site.
I was recommended this website via my cousin. I am not certain whether or not this submit is written via him as no one else recognise such detailed about my problem. You're incredible! Thanks!
I am sure this piece of writing has touched all the internet users, its really really nice article on building up new blog.
I visited various web sites but the audio quality for audio songs current at this web page is truly superb.
Ahaa, its good dialogue regarding this piece of writing here at this webpage, I have read all that, so at this time me also commenting at this place.
I should admit that your post is very appealing. I have spent a lot of my spare time reading your posts. Thanks for sharing!
Ahaa, its nice conversation on the topic of this post at this place at this weblog, I have read all that, so at this time me also commenting here.
Hi, I do think this is an excellent web site. I stumbledupon it ;) I am going to come back yet again since I book-marked it. Money and freedom is the greatest way to change, may you be rich and continue to help other people.
I’ll right away clutch your rss as I can’t find your email subscription hyperlink or e-newsletter service. Do you have any? Please allow me recognise so that I could subscribe. Thanks.
Hi! Someone in my Myspace group shared this website with us so I came to give it a look. I'm definitely enjoying the information. I'm bookmarking and will be tweeting this to my followers! Fantastic blog and wonderful design.
There is definately a great deal to find out about this topic. I love all of the points you made.
Leave a Comment