Setup a development environment with free and open source web server solution stack (XAMPP) and Database management software (phpMyAdmin)
XAMPP and phpMyAdmin as localhost provides a local server for developers to test and build web apps. XAMPP is a local server that is installed on personal computers/laptops. It provides a local environment to create, run, and test PHP applications before deploying them on live servers.
We will cover following sections in this blog post:
XAMPP is free and open source web server solution stack. It contains Apache, MySQL, MariaDB, PHP, and Perl. XAMPP is available for Windows operating systems. It is extremely easy to install and use. That’s why it’s the most popular PHP development environment. XAMPP and phpMyAdmin as localhost provides a complete environment for web app development and testing.
Alphabets in XAMPP stand for:
- X — cross-platform (supports multiple operating systems including Linux, Windows and Mac OS)
- A — Apache HTTP Server
- M — MariaDB (Database)
- P — PHP
- P — PERL
- Download XAMPP from here.
- Install the executable file.
- Then click “Next”.
- Choose the components you want to install.
- For most web apps you only need Apache, MySQL, PHP, and phpMyAdmin.
- Select the installation directory where you want to install XAMPP.
- You will be shown a windows security alert. You must check the following option: “Private networks, such as my home or work network”.
- Finally click on “Finish” to complete installation.
- After successful installation, open XAMPP control panel.
- Start “Apache” and “MySQL” services.
To access phpMyAdmin dashboard, click on “Admin” button next to MySQL service. You can also access phpMyAdmin by visiting http://localhost/phpmyadmin from your browser. Here you can create databases. Follow these steps to create a new database.
- From dashboard, click on “Databases” tab.
- Enter database name and click on “Create” button. This will simply create a new empty database.
- Next you can create tables by selecting the newly created database.
- Enter table name under “Create Table”.
- Select number of columns.
- Then click on “Go” button.
- After that you need to fill the form on next page to finish creating table.
XAMPP installation is simple and straight forward. It takes no more than 15 minutes to the setup XAMPP server. Once it’s installed, developers can build and test their PHP based web apps even without an internet connection. Instead of testing projects directly on a live web server, it’s simple and time-saving to test them locally. It’s a great platform for beginners to learn, test, and polish their PHP, Perl, and database skills.