XAMPP is an essential tool for beginning developers because it provides a local server environment that allows you to develop and test PHP projects on your own computer. With XAMPP, you can run Apache and MySQL without needing an internet connection, making it easier to learn and experiment with PHP.
Step-by-Step Guide to Installing XAMPP
- Download XAMPP:
- Visit the XAMPP website and download the version compatible with your operating system. We recommend downloading XAMPP with PHP 8.2 or 8.3 for the latest features and improvements.
- Install XAMPP:
- Run the installer and follow the on-screen instructions.
- During the installation, you’ll see a screen with several package options. To keep the installation lean, deselect packages you don’t need, like Tomcat, Perl, and Webalizer. Refer to the screenshot bellow for guidance.
- Start Apache and MySQL:
- Open the XAMPP Control Panel.
- Click the “Start” buttons next to Apache and MySQL to initiate these services.
- The
htdocs
Folder:- The
htdocs
folder is where you’ll store your PHP projects. It’s located in your XAMPP installation directory. - To create your first PHP project, make a new folder inside
htdocs
(e.g.,my-project
). - Add your PHP files to this folder.
- Access your project by navigating to
http://localhost/my-project
in your web browser.
- The
Lexicon
Here’s a list of key terms mentioned in this article. Use them to ask an AI of your choice for more information and deepen your understanding. For quick answers, try Copilot.
- Apache
A popular open-source web server. - MySQL
A widely-used relational database management system. - PHP
A server-side scripting language for web development. - Local Server Environment
A setup that allows you to run server-side scripts on your local computer. - htdocs
The default directory for web server files in XAMPP.