The 500 Internal Server Error in XAMPP can be frustrating — one moment your local sites are running fine, and the next, nothing loads. This error means Apache can’t complete the request due to a configuration, module, or script issue.

Luckily, the fix is usually straightforward. Here are 5 easy steps you can follow to get your XAMPP server back online.
1. Check and Remove the .htaccess File
After moving or upgrading XAMPP, the .htaccess
file in the /xampp/htdocs/xampp/
directory can cause conflicts.
- Navigate to:
/XAMPP/htdocs/xampp/
- Rename or delete the .htaccess file.
- Restart Apache from the XAMPP Control Panel.
- Visit http://localhost to test.
2. Enable Required Apache Modules
Some CMS or frameworks need specific Apache modules to process requests correctly.
- In XAMPP Control Panel, click Config → Apache (httpd.conf).
- Ensure these lines are uncommented (remove the
#
if present):LoadModule rewrite_module modules/mod_rewrite.so LoadModule headers_module modules/mod_headers.so
- Restart Apache.
3. Check Apache Error Logs
Error logs give you clues about the problem.
- Logs are stored at:
/XAMPP/apache/logs/error.log
- Open the file and look for recent entries.
- Fix any missing files, incorrect paths, or syntax errors mentioned.
4. Verify PHP Code
A broken PHP script can trigger a 500 error.
- In php.ini, set:
display_errors = On
- Restart Apache.
- Reload your page — the actual PHP error should now display.
5. Check File Permissions (Linux/macOS)
If running XAMPP on Linux or macOS, make sure permissions are correct:
- Folders:
755
- Files:
644
- Apache user should own the project directory.
💡 Pro Tip: After moving XAMPP, update any absolute paths in httpd-vhosts.conf
or .htaccess
that still point to the old location.