Skip to content
Follow
Windows

How to Set Up WordPress on Your Windows 11 PC Using XAMPP

Richard
Written by
Richard
Jan 31, 2026 Updated Jul 10, 2026 5 min read
How to Set Up WordPress on Your Windows 11 PC Using XAMPP
How to Set Up WordPress on Your Windows 11 PC Using XAMPP

Curious about running WordPress on your own computer, even offline? This guide shows you how using a free program called XAMPP.

⚡ Quick Answer

Install XAMPP, then create a database for WordPress using the XAMPP Shell or phpMyAdmin. Download WordPress, extract its files into the C:xampphtdocs folder, and then run the WordPress installer via your browser at http://localhost/wordpress.

What is XAMPP?

XAMPP is a free tool. It turns your Windows 11 PC into a local web server, so you can set up WordPress without needing a live website. It includes Apache, which acts as the web server, MariaDB for storing your WordPress content, and PHP, the programming language WordPress is built with.

  • Apache (the web server)
  • MariaDB (the database where WordPress stores your content)
  • PHP (the language WordPress is written in)

You can install XAMPP on Windows 11 or other systems. This guide focuses on Windows 11.

Step 1Install XAMPP

Installing XAMPP on your Windows 11 PC is the first step to setting up WordPress locally. Follow our guide to install XAMPP. Once installed, the XAMPP Control Panel helps you manage the Apache web server and MariaDB database needed to run WordPress.

How to Install XAMPP on Windows 11

The XAMPP Control Panel, after installation, allows users to manage the Apache web server and the MariaDB database. This central management hub is essential for running WordPress locally on a Windows 11 PC.

Step 2Create a Database for WordPress

Your WordPress site requires a database to store information. You will create this WordPress database using XAMPP’s tools on your Windows 11 PC. First, open the XAMPP Control Panel. Then, click the Shell button and type mysql -u root to begin building your WordPress database.

  1. Open the XAMPP Control Panel.
  2. Click the Shell button (see image below) to open a command window.
XAMPP Shell Button
XAMPP Shell Button

  1. In the shell window, type this command to open the database:

mysql -u root

Now, enter these commands one by one. Remember to replace your_password_here with a password you’ll want to remember:

⚠️Warning
CREATE DATABASE wordpressdb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'wordpressdbuser'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT ALL PRIVILEGES ON wordpressdb.* TO 'wordpressdbuser'@'localhost';
FLUSH PRIVILEGES;
exit

If you prefer a graphical interface, you can click the Admin button next to MySQL in the XAMPP Control Panel. This will open phpMyAdmin, where you can create a new database and user with full permissions using its visual interface (see image below):

Create Database in phpMyAdmin
Create Database in phpMyAdmin

Step 3Download and Set Up WordPress

Before installing WordPress, you must download the latest WordPress version and place the WordPress files in the correct folder on your Windows 11 PC. First, navigate to the 📁C:\xampp\htdocs folder and create a new folder named ‘wordpress’ inside it. After that, download WordPress from the official WordPress site and extract the files into this new ‘wordpress’ folder.

  1. Go to the folder C:\xampp\htdocs on your PC.
  2. Create a new folder inside called wordpress.
  3. Download WordPress from the official WordPress download page.
  4. Extract the WordPress files you downloaded into the wordpress folder you just created.
WordPress folder inside XAMPP
WordPress folder inside XAMPP

  1. Next, open the file C:\xampp\htdocs\index.html with a text editor like Notepad. This file controls what shows up when you visit your local server.
  2. Replace its content with this code to make your browser go directly to the WordPress site:

<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/wordpress/');
exit;
?>

Something is wrong with the XAMPP installation 🙁

  1. Save the file.

Step 4Restart Apache Server

Go back to the XAMPP Control Panel. Stop the Apache service, and then start it again. This ensures your changes take effect.

Step 5Install WordPress

With WordPress files in place, you’ll use your web browser to finish the installation on your Windows 11 PC. Visit http://localhost/wordpress to launch the WordPress setup wizard. Follow the on-screen prompts, choose your language, and enter the database details you created earlier to complete the installation.

http://localhost/wordpress

The WordPress setup screen will appear. Follow these steps:

  1. Choose your language and click Continue.
  2. Click Let’s go! to start.
  3. Enter the database details you created earlier:
    • Database Name: wordpressdb
    • Username: wordpressdbuser
    • Password: the password you set
    • Database Host: localhost
    • Table Prefix: leave it as wp_
  4. Click Submit.
  5. Click Run the installation.
  6. Fill in your site title, choose an admin username and password, and enter your email.
  7. Click Install WordPress.

If everything is correct, WordPress will finish the installation and you can log in to your new site!

WordPress Setup Complete
WordPress Setup Complete

Summary

  • You installed WordPress on your Windows 11 PC using XAMPP — no internet needed!
  • You created a database for WordPress to save your website data.
  • You downloaded WordPress and set it up to run on your local server.
  • You installed WordPress through the web setup wizard.

You’ve successfully installed WordPress on your Windows 11 PC using XAMPP, creating a functional local website without needing an internet connection. This process involved installing XAMPP, creating a database, downloading WordPress files, and running the web setup wizard.

Can I use WordPress with XAMPP?

Stack-based solutions such as XAMPP make for a great way to develop WordPress websites on your computer. The entire setup process takes no time, and once you have everything installed, you're able to create posts, pages, and the entirety of your WordPress website.

Is XAMPP good for WordPress?

Yes, XAMPP is a great choice for running WordPress locally because it includes all the necessary tools like a web server and database in one package.

Does XAMPP work on Windows?

An XAMPP server can be installed and used with a single executable file quickly, functioning as a local test system for Linux, Windows, and Mac OS X. The software packet contains the same components that are found on common web servers.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

Accessing the Windows Studio Effects Settings in Windows 11
Windows Accessing the Windows Studio Effects Settings in Windows 11
How to Delete Files in Windows 11
Windows How to Delete Files in Windows 11
How to Access Settings in Windows 11
Windows How to Access Settings in Windows 11
How to Send Files Directly through Email in Windows 11
Windows How to Send Files Directly through Email in Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *