How to run Projects in XAMPP

Dear Reader, let us know about “How to run Projects in XAMPP“. So in this tutorial, we will learn Step By Step that How to run Projects in XAMPP.

Let us learn with a language, say PHP.  So to create a dynamic website that makes use of PHP code then you require Apache server to compile your PHP code.  In case you want to perform some operations related to a database such as storing data into a database or fetching data from a database. you want to have MySQL, MariaDB database functionality.

So, you need to use XAMPP to fulfill the requirements to run your PHP, Perl, and some other programming languages.

XAMPP offers the Run environment or executes codes and tasks for your PHP, Perl and some other language programming. It is open source and free to use. XAMPP was developed by Apache Friends. Includes Apache HTTP server, MySQL, PHP parser, Perl and other programming languages, Maria DB etc.

Follow the below steps to run your PHP code or project using the XAMPP server.

Step 1:  Install XAMPP

The first step is to install XAMPP onto your computer. it is very easy to install XAMPP. Just visit the official website to download XAMPP.

You can download it from

On this site you can see XAMPP for Windows, Linux and OS X. Where you can download XAMPP based on your computer OS and after downloading install it.

Step 2: Open XAMPP control panel

After installing XAMPP on to your PC the next step is to start the Apache server and MySQL.

The control panel XAMPP which is something like this.

To launch Apache service and MySQL service, click on the Start button. if you want to stop any of the services at any time you can click on stop button in XAMPP control panel.

Step 3: Execute The Project

Once the Apache and MySQL services are started and running in the background. Copy your Project folder and navigate to xampp folder (which is basically located in C drive) and inside this folder (xampp) find the htdocs folder and paste the project folder into this htdocs folder.

The path will look like this C:\xampp\htdocs

After the project folder is successfully copied to the specified location on your computer.  Then go to your browser (Chrome) and type in URL field:  localhost/folder_name and then hit the enter.

If you are using CodeIgniter, then you will get an error like this for Database Connection.

So create Database and import sql file of your desired project.


And then you need to change config as well as database file under application folder with any editor. We have taken Sublime as Text Editor.


Now your Project Website will run smoothly as this.



Congratulations you have successfully learnt “How to run Projects in XAMPP”, if you like this post and was helpful for you then share this post on social media and if you have any query then please contact us or comment below, Thanks


Leave a comment:

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