Local WordPress development on Windows 11 using XAMPP (a free tool bundle that includes the Apache web server, MariaDB database, and PHP) lets you build and test websites offline without a live server.
XAMPP version 8.2.4 or a later release provides the exact environment needed to run a complete website right from your PC, acting as a practice area before you publish content online.
Install XAMPP, create a database using the XAMPP shell or phpMyAdmin, and then download WordPress files into the 📁C:\
Why use a local environment?
Running WordPress locally lets you test themes, try plugins, or build a site from scratch away from public view. Once you’re done, you’ll have a fully functional website ready to be moved to a live server.
Step 1Install XAMPP
XAMPP includes Apache web server software and a database, providing everything you need to run WordPress. If you have not yet installed XAMPP, our guides offer instructions for installing XAMPP.
Step 2Create a WordPress Database
Creating a WordPress local installation database happens inside phpMyAdmin, a tool bundled with XAMPP. You make a new database by opening http://localhost/phpmyadmin/ in your web browser, clicking the Datasets tab, typing a name for your site storage, and clicking Create. This gives WordPress a place to store your posts, pages, and settings before you run the installer.

Open your terminal and run this command to log in to your database server:
mysql -u root
Now, run these commands to create your database and a secure user account:
CREATE DATABASE wordpressdb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER wordpressdbuser@localhost IDENTIFIED BY 'type_your_password_here';
GRANT ALL ON wordpressdb.* TO wordpressdbuser@localhost;
FLUSH PRIVILEGES;
exit
Remember to replace type_your_password_here with a password you'll recall. If you prefer a visual interface, click the 'Admin' button next to MySQL in the Control Panel to use phpMyAdmin instead.

Step 3Download and Set Up WordPress
Setting up your WordPress local installation files requires downloading the official software package and moving it into your XAMPP directory. You grab the latest zip file from the official WordPress site, extract the contents, and paste the resulting folder into C:\xampp\htdocs. XAMPP reads these files to run your website locally on your computer.

Download the latest version of WordPress from official download page. Extract the files and move them into your new wordpress folder.
To have your browser open your site automatically, find the index.html file in C:\xampp\htdocs and replace its contents with this code:
<?php if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) { $uri = 'https://'; } else { $uri = 'http://'; } $uri .= $_SERVER['HTTP_HOST']; header('Location: '.$uri.'/wordpress/'); exit; ?>
Save this file and restart Apache in your XAMPP Control Panel.
Step 4Complete the WordPress Installation
Completing your WordPress local installation involves opening your browser and entering your database details on the setup screen. You go to http://localhost/wordpress to launch the setup wizard, type in the database name, username, and password you made earlier, and let WordPress connect to XAMPP to finish building your site.

Click "Let's go" to start.


Click "Run the installation".

Fill in your site title and create your admin login details, then click "Install WordPress".

You are all set!

Summary
By installing XAMPP and setting up a local database, you've created a private environment to build your website. This setup allows you to develop and experiment safely on your own machine. When you are finished, you can migrate your local site to a live web host.
[C:xampphtdocswordpress]
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!