Installing WordPress on a Windows computer using XAMPP allows you to create a complete local website environment for testing and development without needing a live web server.
In this guide, you will learn how to install XAMPP, create a MySQL database, set up WordPress, and access your new local WordPress dashboard.
To install WordPress on a Windows computer using XAMPP (the standard web server stack containing Apache, MariaDB/MySQL, and PHP), follow these steps:
Apache and NGINX are the two industry-standard web servers powering the modern web—Apache relies on a thread-based architecture with flexible .htaccess rules, while NGINX uses an event-driven model optimized for high concurrency. Understanding these web servers is essential, as both serve as the foundational middleware that connects client requests to PHP and database-driven platforms like WordPress.
WordPress is the world’s most popular open-source content management system, powering everything from simple personal blogs to complex enterprise websites. Its flexible ecosystem of themes and plugins allows anyone to build, customize, and manage a site without writing code.
Download and Install XAMPP
Download the XAMPP for Windows installer from the official Apache Friends website. Run the installer, keep all standard default components checked (ensure Apache, MySQL, and phpMyAdmin are included), and finish the setup.
How to verify: Open the XAMPP Control Panel, click Start next to Apache and MySQL. Both modules should highlight green without showing errors in the log window.
Create a MySQL Database
In the XAMPP Control Panel, click the Admin button next to MySQL to automatically open phpMyAdmin in your web browser (or navigate to http://localhost/phpmyadmin).
Click the Databases tab, type a name for your database (for example, localsitedb), choose utf8mb4_general_ci as the collation, and click Create.
How to verify: Check the left sidebar in phpMyAdmin; your new empty database name should appear in the list.
Download and Extract WordPress
Go to wordpress.org and download the latest .zip package.
Extract the ZIP file into your XAMPP installation's web directory, which is typically C:\xampp\htdocs\. Rename the extracted wordpress folder to match your site's name (for example, localsite).
How to verify: Open File Explorer and navigate to C:\xampp\htdocs\localsite. You should directly see core WordPress files like wp-load.php and index.php.
Run the WordPress Setup Wizard
Open your browser and navigate to http://localhost/localsite (replace localsite with your specific folder name).
Select your language and click Continue, then click Let's Go! on the next prompt.
Enter the connection details:
Database Name: The exact name created in Step 2 (for example, localsitedb).
Username: root
Password: Leave blank (XAMPP's default MySQL root password is empty).
Database Host: localhost
Table Prefix: wp_
Click Submit, then Run the installation.
Fill in your desired Site Title, create an Admin Username and Password, and click Install WordPress.
How to verify: You will receive a success page. Click Log In and navigate to http://localhost/localsite/wp-admin to access your new local WordPress dashboard.
WordPress on Localhost Is Ready
And now, your local WordPress environment is ready! Use it to test plugins, experiment with designs, and refine your site risk-free.
Once you're fully satisfied with your local setup, you'll be ready to migrate to a live web server and launch your site to the world.
Setting up WordPress locally with XAMPP gives you a practical environment for testing plugins, experimenting with designs, and refining your website before publishing it online.
After completing these steps, your local WordPress installation will be ready for development and testing on your Windows computer.
.webp)