DEV Community

Cover image for ๐Ÿš€ Setting Up XAMPP for Development
Carl Angelo Nievarez
Carl Angelo Nievarez

Posted on โ€ข Edited on

5 2

๐Ÿš€ Setting Up XAMPP for Development

๐ŸŽฅ Watch on YouTube: XAMPP Configuration Video

XAMPP is one of the most useful tools for developersโ€”it's my go-to starter kit for setting up local development environments. Here's how I configure it! ๐Ÿ‘‡


๐Ÿ›  Installing XAMPP

  1. Download XAMPP for your OS (I'm using Windows in this guide).
  2. Install the applicationโ€”ignore the UAC prompt for now.
  3. Choose your installation directory (I avoid Drive C: and use a dedicated development drive instead).
  4. Start the XAMPP Control Panel.

โš™ Configuring Apache, PHP, and MySQL

๐Ÿ”น Accessing phpMyAdmin Over a Network

By default, youโ€™ll see this error when trying to access phpMyAdmin over a network:

Access forbidden!
New XAMPP security concept:
Access to the requested directory is only available from the local network.
Enter fullscreen mode Exit fullscreen mode

Fix:

  1. Open the XAMPP Control Panel.
  2. Click on the Apache config button and open httpd-xampp.conf.
  3. Find Require local and change it to Require all granted.
  4. Restart Apache from the XAMPP Control Panel.

๐Ÿ”น Setting phpMyAdmin Credentials

  1. Open the XAMPP Control Panel.
  2. Click on the Apache config button and open config.inc.php.
  3. Add a Blowfish secret key:
   $cfg['blowfish_secret'] = 'yourblowfishkeyhere12345';
Enter fullscreen mode Exit fullscreen mode
  1. Update authentication settings:
   $cfg['Servers'][$i]['auth_type'] = 'cookie';
   $cfg['Servers'][$i]['user'] = 'root';
   $cfg['Servers'][$i]['password'] = 'yourpasswordhere';
   $cfg['Servers'][$i]['AllowNoPassword'] = false;
Enter fullscreen mode Exit fullscreen mode
  1. Restart Apache.

๐Ÿ”น Granting MySQL Access Over the Network

By default, MySQLโ€™s root account is only accessible locally. To enable network access:

  1. Open phpMyAdmin or log in via CLI.
  2. Run:
   GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
   FLUSH PRIVILEGES;
Enter fullscreen mode Exit fullscreen mode

๐Ÿ”น Configuring Timezone in PHP

By default, PHPโ€™s timezone is Europe/Berlin. To change it:

  1. Open the XAMPP Control Panel.
  2. Click on Apache config and open php.ini.
  3. Find date.timezone and update it to your timezone:
   date.timezone=Asia/Manila
Enter fullscreen mode Exit fullscreen mode
  1. Save and restart Apache.

๐Ÿ”น Changing Apache Ports

If port 80 is occupied (e.g., by IIS or Nginx), change it:

  1. Open the XAMPP Control Panel.
  2. Click Config > Service and Port Settings > Apache.
  3. Open httpd.conf, find Listen 80, and replace it with your desired port.
  4. Restart Apache.

๐Ÿ“‚ Configuring FileZilla FTP Server

XAMPP includes a built-in FileZilla Server for secure file transfers. Hereโ€™s how to set it up:

  1. Start FileZilla Server from XAMPP.
  2. Click Admin (default login: 127.0.0.1, port 14147, no password).
  3. Go to Edit > Settings to change the admin password.
  4. Create an FTP group:
    • Click Group Icon > Add Group > Set name.
    • Under Shared Folders, add your project directory.
  5. Create an FTP user:
    • Click User Icon > Add User > Set username and password.
    • Assign the user to a group.
  6. Test the setup by accessing ftp://yourhostserver in a browser or Windows Explorer.

๐Ÿ“ง Overview of Mercury Mail Server

Mercury is a built-in mail server for managing email accounts within your organization.

https://youtu.be/7dcaUUlsMOg

๐ŸŽฅ Credits: Parag Dhali


๐Ÿ— Configuring Tomcat for Java Applications

Tomcat provides a Java-based web server environment. By default, it runs on port 8080, and user roles need to be configured.

๐Ÿ”น Configuring Tomcat Users

Add this to tomcat-users.xml:

<tomcat-users>
  <role rolename="admin-gui"/>
  <role rolename="manager-gui"/>
  <user username="username" password="yourpasswordhere" roles="admin-gui,manager-gui"/>
</tomcat-users>
Enter fullscreen mode Exit fullscreen mode
  1. Open XAMPP Control Panel.
  2. Click Config > tomcat-users.xml.
  3. Paste the above XML snippet inside the file.
  4. Restart the Tomcat service.

๐ŸŽ‰ All Set for Development!

Thatโ€™s it! Your XAMPP environment is now fully configured for local development.

๐Ÿ’ฌ Got questions or suggestions? Drop them in the comments below!

Top comments (11)

Collapse
 
roelofjanelsinga profile image
Roelof Jan Elsinga โ€ข

That was a beautiful nostalgic moment! I've used xampp for several years with pleasure and only stopped using it when I switched to Linux.

Definitely recommended for those developing on Windows and don't want to mess with Docker. Great post!

Collapse
 
aice09 profile image
Carl Angelo Nievarez โ€ข

Thank you so much sir.

Collapse
 
hte305 profile image
Ha Tuan Em โ€ข

Cover image is Graden of Words.

Collapse
 
aice09 profile image
Carl Angelo Nievarez โ€ข โ€ข Edited

Really? So that's another beautiful anime movie of Makoto Shinkai if ever, I just get the image in Pinterest.
By the way I use it as cover because for me it's represent hardwork and determination.

Collapse
 
hte305 profile image
Ha Tuan Em โ€ข

Yeh, I love this anime. I watched in many years and I love it so much and the music and sound of Shinkai.

Collapse
 
madza profile image
Madza โ€ข

I would highly recommend Laragon for local development.
Switched from XAMPP, never looked back.

Collapse
 
aice09 profile image
Carl Angelo Nievarez โ€ข

Thank you for recommendation. I will try Laragon for dev.

Collapse
 
go_anime_d62108f835d19729 profile image
Go anime โ€ข

Getting started with XAMPP is crucial for any developer's toolkit, much like installing the GoGoAnime APK for anime enthusiasts. Both serve as foundational tools, with XAMPP facilitating local server setup for web development, while the GoGoAnime APK brings easy access to a vast library of anime content. Configuring XAMPP marks the initial step towards creating dynamic websites, just as installing the GoGoAnime APK opens doors to a world of animated entertainment, making them indispensable resources for respective pursuits.

Collapse
 
tripol profile image
Ekanem โ€ข

Thanks a lot. This worked perfectly as described

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt โ€ข โ€ข Edited

The only concern with PHP is whether I can have multiple projects / web servers in one PC?

What do you think about composer?

Collapse
 
aice09 profile image
Carl Angelo Nievarez โ€ข โ€ข Edited

PHP can be hosted using Nginx, Apache and IIS, 3 of my tested web server of it and you can do multiple project on it, I hope this answer your first question.
Then I love Composer, this provide great package for my projects. I also recommend NPM.

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay