Install WordPress Locally Using Xampp tutorial shows you how to set up Xampp locally in a laptop or desktop and install WordPress and more.
Last Updated: January 3, 2023
Latest News: Updated the documentation.
For those who are developers and love WordPress, you know how important it is to test your projects; i.e. WordPress websites.
In this tutorial you will learn how to set up Xampp locally and install WordPress. You will also learn how to test a live site locally by importing the backup including the database into Xampp.
The security part of Xampp is no longer available because it was removed by Xampp developers. They said that Xampp is already secured enough to run locally.
This tutorial was written using Windows operating system. It also has been tested using the following versions Windows 7, 8.1, 10 and 11.
Xampp Control Panel Version: 3.3.0 [ Compiled: Apr 6th 2021 ]
Important: Remember your local Xampp installation might be running a different version of Apache, PHP and MySQL. Keep this in mind if you intend to upload the site developed locally into your live server.
Note: For security reasons if you are still running Windows 7 make sure you update to Windows 10 or 11 as soon as possible. Microsoft stopped supporting Windows 7 on January 14, 2020. You can read more about it from the following URL Windows end of life cycle.
Install WordPress Locally Using Xampp
What you need:
- Install Xampp Locally For WordPress
- Create MySQL Database Locally Using Xampp
- Install WordPress Locally Page Two
- Install WordPress Locally Security Setup
- Test Your WordPress Site Locally. (Optional)
- Import Database (Optional)
- Edit WP Config File (Optional)
Q1 How can I send emails through Xampp?
Answer: Please check the following instructions. They should help you.
Q1 MySQL server crashed in Xampp, how do I recover MySQL again?
Answer: If MySQl shuts down unexpectedly or it won’t run anymore, the following link xampp-mysql-shutdown-unexpectedly can help you troubleshoot MySQL.
Q2 Apache shutdown, how do I fix this?
Answer: The first step is to check the log files. Go to Xampp Control panel and click on Apache Logs button. Then click on Apache (error.log). If you see the following warning.
PHP Warning: ‘C:\\WINDOWS\\SYSTEM32\\VCRUNTIME140.dll’ 14.0 is not compatible with this PHP build linked with 14.29 in Unknown on line 0
Try repairing Microsoft Visual C++ 2015-2022 Redistributable (x64) via Control Panel – Programs and Features in Windows 10. This is what worked for me.
If you have any question please let me know. I will be updating these tutorials from time to time so make sure you come back for the latest.
I hope these tutorials help you.
WordPress Setup Tutorial List:
Also need to add post_max_size=128M to php ini file
Hello John, thank you for your comment. Yes I see your point in adding post_max_size=128m, if you read at the beginning you will notice that I have also added that option. I will have to make it more clear.
Nice tutorial. Complete information on wp installation.
Thank you Dhruv Thaker
it is the one of the way 2 create the database but there are several ways 2 create the database in xampp server
Hello Kalaivanan, thank you for your comment. Yes you are correct there are several ways to create a database. In Xampp this is the best method to create a database. This method is the same method implemented when creating a new database using phpMyAdmin in cpanel on a live server.
I think in the past you also mentionned changing the maximum execution time ($cfg[‘ExecTimeLimit’] = 900 or more instead of default 300 sec) in xampp/phpMyAdmin/libraries/Config.default. I do not see this recommendation any more. But it is very useful when importing large databases so that there is no interruption of the import process.
Hi Fermanus, you can read the following documentation. I mentioned this in Step 5 ). Let me know if this is what you mean.
I am not sure. One year ago I followed your excellent tutorial and did all recommended changes in “PHP.ini”. In addition at that time I also modified exec_time in “Phpmy admin” more specifically in the file “config.default”.because I had problems importing databases without interruption .
So I think it is different from step 5. I thought this recommendation came from your tutorial but maybe not? In any case for me this was very useful and allowed me to import moderately large databases using phpmyadmin without errors.
Anyway, thanks for your tutorials and the AIOWPS support.