XAMPP bundles Apache, MySQL, PHP, and Perl into a single Windows installer — everything you need for local WordPress development. Download XAMPP from Apache Friends and run the installer. On macOS, check out my MAMP setup guide instead.
Why XAMPP?
I’ve tried most of the local development options for Windows — XAMPP is my go-to because it’s the simplest to configure. My production server runs Linux, so an exact match isn’t possible, but I configure PHP and MySQL versions to stay as close as I can.
This is part of a series on building custom WordPress themes with DevWP. Check out the companion video:
Enabling Essential PHP Extensions
XAMPP ships with some PHP extensions disabled. Enable these three before installing WordPress:
- Start XAMPP — Open the XAMPP Control Panel.
- Configure Apache — Click on the Config button next to Apache and select PHP.ini.
- Edit PHP.ini — Search for extension=fileinfo and remove the semicolon for the following extensions: extension=gd, extension=intl, extension=zip.
- Restart Apache — Save the changes and restart Apache via the XAMPP Control Panel.
Key File Locations
You’ll reference these paths throughout the setup — bookmark them:
- PHP Executable:
C:\xampp\php\php.exe - PHP Configuration:
C:\xampp\php\php.ini— adjust memory limits, upload sizes, and extensions here - MySQL Configuration:
C:\xampp\mysql\bin\my.ini— adjust buffer pools and packet sizes here
Adding PHP and MySQL to Your System Path
CLI tools like composer, phpcs, and phpstan need to find PHP on your system. Adding PHP and MySQL to your PATH lets you use them from any terminal window:
- Search for Environment Variables in the Windows search bar and open it.
- Click the Environment Variables button.
- In the “System Variables” section, find and select the “Path” variable, then click Edit.
- Click New and add
C:\xampp\php. - Click New again and add
C:\xampp\mysql\bin. - Save the changes and restart your computer.
- Open Command Prompt and type
php -vto confirm PHP is in your path.
Fine-tuning PHP and MySQL Settings
PHP.ini Adjustments
Open C:\xampp\php\php.ini and update the following settings:
memory_limit = 512M
max_execution_time = 300
max_input_time = 240
post_max_size = 64M
upload_max_filesize = 64M
mysql.connect_timeout = 240Save the file and restart Apache via the XAMPP Control Panel.
MySQL (my.ini) Adjustments
Open C:\xampp\mysql\bin\my.ini and update the following settings:
[mysqld]
max_allowed_packet = 64M
innodb_buffer_pool_size = 256M
[mysqldump]
max_allowed_packet = 64MSave the file and restart MySQL via the XAMPP Control Panel.
Document Root and Local URL
- Local URL:
http://localhost - Document Root:
C:\xampp\htdocs
This is where you will place your various WordPress installations. For example:
C:\xampp\htdocs\wordpressC:\xampp\htdocs\dev
Common XAMPP Issues and Fixes
Common XAMPP issues and how to fix them:
- Make sure you have the latest version of XAMPP installed.
- Check for port conflicts — Apache uses port 80 and MySQL uses port 3306. Run
netstat -ano | findstr :80in Command Prompt to see what’s listening. - Check the XAMPP error logs located in
C:\xampp\apache\logsandC:\xampp\mysql\datafor any specific error messages. - Verify that your firewall or antivirus software is not blocking XAMPP.
XAMPP FAQ
Do I need XAMPP or can I use WSL instead?
WSL (Windows Subsystem for Linux) is a valid option if you’re comfortable with Linux. XAMPP is simpler — one installer, a GUI control panel, and no command-line configuration. I recommend XAMPP for beginners and WSL for developers who already know their way around a Linux terminal.
Can I change the PHP version in XAMPP?
Not directly — XAMPP bundles a specific PHP version with each release. To switch versions, download a different XAMPP release that includes the PHP version you need. You can run multiple XAMPP versions side by side in different directories (e.g., C:\xampp-php81 and C:\xampp-php83), but only one can run at a time.
Why does Skype block Apache from starting?
Skype historically used port 80 by default, conflicting with Apache. In Skype settings, go to Advanced → Connection and uncheck “Use port 80 and 443 as alternatives for incoming connections.” Restart Apache after making the change.
With XAMPP configured, you have a local environment ready for WordPress development. Install WordPress in your htdocs directory and start building. For the rest of the dev environment setup, check out my guides on Git, Node.js, Composer, and VS Code.
