Tutorial: how to install XAMPP on localhost step by step
To develop web php or WordPress CMS, you must be install Apache, Mysql, and PHP. So, how to install XAMPP on localhost ?
1. Apache: Apache is a Web Server. It is a very popular and free support by Apache Software
2. Mysql: MySql is a Database, it is a place to storing many information (data) and every web application is require a database to store data. MySql is the most world’s most popular database
3. PHP: PHP is a programming language application designed to cater for the demand to write applications based on Web service. That means that we only use the PHP website programming, PHP and the data will be exported as HTML for browser display.
4. Localhost: localhost mean using Laptop or PC private to made Server.
5. Xampp: XAMPP is a program that creates the Web server built Apache, PHP, MySQL, FTP Server, Mail Server and tools like phpMyAdmin. Unlike appserv, XAMPP management program quite convenient, allowing proactive turned off or restart the server service at any time
Should install XAMPP Instead of install each Apache, Mysql, PHP and config each they
- To download XAMPP, you first access address and select the version of XAMPP https://www.apachefriends.org/download.html suite of computer operating system you are using, and you should choose version PHP 4.31. Note that only XAMPP version for 64bit OS 32bit but still function normally
- After downloading the installation file, run it, then click Next. Folder to install XAMPP (you should set default and next)
- After installing, click the Finish button to finish the installation and opening of XAMPP control panel (xampp-control icon in desktop or C:\xampp) and click start Apache, Mysql
Notes: Service apache run default in port 80, if you start apache failed then have 2 solution:
- Uncheck port skype (Skype -> Tools -> Options… -> Advanced -> Connection) uncheck use port 80 and 443
- Check IIS (if have install IIS): stop service IIS
Other solution: change port apache, open file httpd.conf (C:\xampp\apache\conf), find and replace as below:
- Listen 80 -> replace Listen 8015
- ServerName localhost:80 -> replace to ServerName localhost:8015
Now, Stop and start again Apache
Open web browser with url http://localhost:8015/ and see screen XAMPP is successful. In here, I change port and using 8015, if you have not change port (mean is using port 80) you only open url http://localhost . With url http://localhost:8015/phpmyadmin to manage database MySql
After install XAMPP finish and run web phpmyadmin is susscessful, you can develop for your website. Source website put at htdocs folder (C:\xampp\htdocs)
Example 1: create hello.php file in C:\xampp\htdocs and code as below:
echo "Hello World !";
Save and open browser with url http://localhost:8015/hello.php , result is: Hello Word !
Example 2: create demo folder in C:\xampp\htdocs and create index.php in demo folder. Index.php code as below:
echo "Hello World !";
Save and open browser with url http://localhost:8015/demo , result is: Hello Word !Tags: install php, install xampp, localhost, xampp