Setting Up XAMPP for Local Development
Before Docker was the default answer to “how do I run a local dev environment,” there was XAMPP — and honestly, it’s still one of the fastest ways to get Apache, PHP, and MySQL running on a machine without fighting your OS for an hour first. It’s been my go-to starter kit for years, so here’s exactly how I set it up, quirks and all.
Installing XAMPP
- Download XAMPP for your OS (Windows, in this walkthrough)
- Run the installer — feel free to ignore the UAC prompt
- Pick your install directory. I avoid the C: drive and put it on a dedicated dev drive instead — keeps things tidy and easier to wipe/reinstall later
- Fire up the XAMPP Control Panel
Configuring Apache, PHP, and MySQL
Accessing phpMyAdmin over a network
Out of the box, trying to hit phpMyAdmin from another machine on your network gets you slapped with:
Access forbidden!
New XAMPP security concept:
Access to the requested directory is only available from the local network.
Fix:
- Open the XAMPP Control Panel
- Click the Apache config button, open
httpd-xampp.conf - Find
Require local, change it toRequire all granted - Restart Apache
Setting phpMyAdmin credentials
- Open the XAMPP Control Panel
- Click the Apache config button, open
config.inc.php - Add a Blowfish secret key:
$cfg['blowfish_secret'] = 'yourblowfishkeyhere12345';
- Update the auth settings:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'yourpasswordhere';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
- Restart Apache
Granting MySQL access over the network
By default, MySQL’s root user is locked to localhost only. To open it up:
- Open phpMyAdmin or log in via CLI
- Run:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Configuring PHP’s timezone
XAMPP ships with PHP’s timezone defaulted to Europe/Berlin, which is rarely useful unless you’re actually in Berlin.
- Open the XAMPP Control Panel, click Apache config, open
php.ini - Find
date.timezoneand set it to yours:
date.timezone=Asia/Manila
- Save and restart Apache
Changing Apache’s port
If port 80 is already taken — commonly by IIS or Nginx — you’ll need to move Apache off it:
- Open the XAMPP Control Panel
- Go to Config → Service and Port Settings → Apache
- Open
httpd.conf, findListen 80, swap in your preferred port - Restart Apache
Configuring the FileZilla FTP Server
XAMPP bundles a FileZilla Server for local file transfers, useful when you want an FTP-based workflow into your dev environment:
- Start FileZilla Server from the XAMPP panel
- Log into Admin (
127.0.0.1, port14147, no password by default) - Go to Edit → Settings and set an admin password immediately
- Create an FTP group — Group icon → Add Group → point it at your project directory under Shared Folders
- Create an FTP user, assign it to that group
- Test by connecting to
ftp://yourhostserver
Configuring Tomcat for Java apps
Tomcat gives you a Java web server environment running on port 8080 by default, but user roles need to be set up before it’s usable.
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>
- Open the XAMPP Control Panel
- Config →
tomcat-users.xml - Paste the snippet in
- Restart the Tomcat service
All set
And that’s the full stack — Apache, PHP, MySQL, FTP, and even Tomcat if you need Java in the mix — configured and ready for local development.