Close Menu
Mokube techMokube tech
  • Home
  • SmartPhones
  • News
  • Latest Reviews
  • How to
  • Contact Us
  • OUR SERVICES
Facebook X (Twitter) Instagram YouTube TikTok
Sunday, September 13
Trending
  • Vivo T5 5G Key Specs Revealed: Battery, Camera Confirmed
  • How to Import Amazon Products to WordPress WooCommerce in Bulk (Complete Guide)
  • How to Set Up WooCommerce in WordPress (Complete Beginner’s Guide)
  • JBL Tune Flex 2 Review: Is This the Best Mid-Range True Wireless Earbud
  • How to Make a Transparent Background in Adobe XD (Complete Guide)
  • Huawei Mate XT 2 Ultimate Design Official First Look Revealed Ahead of September 7 Launch
  • How to Stop Auto Download in WhatsApp (Step-by-Step Guide)
  • Honor Turbo 5G Debuts With 8,560mAh Battery, Snapdragon 6 Gen 4
Mokube techMokube tech
  • Home
  • SmartPhones
  • News
  • Latest Reviews
  • How to
  • Contact Us
  • OUR SERVICES
Facebook X (Twitter) Instagram
  • Camera News
  • MacBook
  • Samsung
  • Apple
  • Google
  • Xiaomi
  • Nothing
  • Sony
  • Telegram tips
  • Canva Tips
  • AI Tools
  • Whatsapp Tips
Mokube techMokube tech
  • Camera News
  • MacBook
  • Samsung
  • Apple
  • Google
  • Xiaomi
  • Nothing
  • Sony
  • Telegram tips
  • Canva Tips
  • AI Tools
  • Whatsapp Tips
Home » How to Install WordPress Locally on Windows Using XAMPP (Step-by-Step Guide)
How to Onoyri MokubeBy Onoyri Mokube

How to Install WordPress Locally on Windows Using XAMPP (Step-by-Step Guide)

Onoyri MokubeBy Onoyri MokubeJuly 26, 2026Updated:August 2, 2026
Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
How To Install WordPress Locally on Windows for Beginners
Share
Facebook Twitter LinkedIn Pinterest Email

Installing WordPress locally on your Windows computer is one of the smartest things you can do as a developer, designer, blogger, or website owner. A local WordPress installation lets you build, test, and experiment with your website in complete privacy — no live server, no hosting fees, and no risk of accidentally breaking something in front of your visitors.


XAMPP is the most popular local server environment for running WordPress on a Windows PC. It stands for Cross-Platform, Apache, MariaDB, PHP, and Perl — a free, open-source software package that bundles everything WordPress needs to run into a single, easy-to-install application. Once XAMPP is running on your computer, your Windows machine essentially becomes its own local web server.

In this complete, beginner-friendly guide, we will walk you through the entire process of installing WordPress locally on Windows using XAMPP in 2026 — from downloading and setting up XAMPP, to creating a database, to completing the WordPress installation and accessing your local site in a browser. We also cover the most common Windows-specific errors and how to fix them.

By the end of this guide, you will have a fully working local WordPress site running on your Windows computer — ready for development, testing, learning, or building your next project.

What Is XAMPP and Why Use It?

<cite index=”9-1″>XAMPP is a popular, battle-tested local development environment that is compatible with Windows, Mac, and Linux. It includes Apache (web server software), MySQL/MariaDB (database management), and PHP — all three components that WordPress requires to run.</cite>

Without XAMPP or a similar local server stack, WordPress cannot be installed directly on a Windows computer on its own. XAMPP creates the server environment that WordPress needs, all in one package, without any complicated individual software installations.

Why developers and beginners choose XAMPP:

  • Free and open-source
  • Widely documented with a large community
  • Works on Windows, Mac, and Linux
  • Installs all required components (Apache, MySQL, PHP) in one go
  • Includes phpMyAdmin — a visual database management tool that makes creating WordPress databases simple
  • Trusted by millions of developers worldwide

What You Will Need



Before starting, confirm you have the following:

  • A Windows PC running Windows 10 or Windows 11
  • At least 512MB of RAM (2GB or more recommended for comfortable performance)
  • At least 1GB of free disk space for XAMPP and WordPress (more is better)
  • An internet connection to download XAMPP and WordPress
  • A web browser (Chrome, Firefox, or Edge)

No prior coding knowledge is required to follow this guide.

Overview of the Process

Here is a quick overview of the steps we will complete:

  1. Download and install XAMPP on Windows
  2. Start Apache and MySQL in the XAMPP Control Panel
  3. Download WordPress from WordPress.org
  4. Move WordPress files to the XAMPP htdocs folder
  5. Create a MySQL database using phpMyAdmin
  6. Run the WordPress installation wizard in your browser
  7. Log in to your local WordPress dashboard



Let us go through each step in detail.

YouTube thumbnailYouTube icon

Step 1: Download and Install XAMPP on Windows

Step 1: Open your browser and go to the official XAMPP website at apachefriends.org.

Step 2: On the homepage, click the Download button for XAMPP for Windows. The download page will show several versions — download the latest stable version. <cite index=”9-1″>Choose the PHP version recommended for your WordPress version to ensure compatibility.</cite>

Step 3: Once the installer file (a .exe file) has downloaded, double-click it to launch the XAMPP Setup Wizard.

Step 4: If a Windows User Account Control (UAC) prompt appears asking for permission, click Yes to allow the installation to proceed.

Step 5: The Setup Wizard will open. Click Next to proceed through the welcome screen.

Step 6: On the Select Components screen, make sure at minimum the following components are checked:

  • Apache — required (web server)
  • MySQL — required (database)
  • PHP — required (programming language)
  • phpMyAdmin — required (database management tool)

You can leave the other components at their defaults. Click Next.

Step 7: On the Installation Folder screen, choose where XAMPP will be installed. The default location is C:\xampp — this is recommended and works best. Avoid installing in C:\Program Files as Windows UAC restrictions in that folder can cause issues. Click Next.

Step 8: Uncheck the option to learn more about Bitnami if prompted (this is optional and not required). Click Next.

Step 9: Click Next to begin the installation. XAMPP will install all components — this typically takes 2 to 5 minutes.

Step 10: Once installation is complete, make sure the checkbox to Start the XAMPP Control Panel is checked and click Finish. The XAMPP Control Panel will open automatically.

Step 2: Start Apache and MySQL in the XAMPP Control Panel



With XAMPP installed, you need to start the two services that WordPress requires — Apache (the web server) and MySQL (the database server).

Step 1: In the XAMPP Control Panel, locate Apache in the modules list. Click the Start button next to it.

Step 2: Locate MySQL in the modules list. Click the Start button next to it.

Step 3: Both services should turn green with the status showing as “Running.” If you see a Windows Firewall notification for either service, click Allow Access to permit them to run.

Tip: If Apache fails to start, another application may already be using port 80 — commonly Skype or IIS (Internet Information Services). To fix this, click Config next to Apache in the Control Panel → click httpd.conf → find the line that says Listen 80 and change it to Listen 8080. Save the file and try starting Apache again. If you change the port, you will access your local sites at http://localhost:8080 instead of http://localhost.

Step 4: Once both Apache and MySQL are running (shown in green), open your browser and type http://localhost into the address bar. If XAMPP is working correctly, you will see the XAMPP dashboard welcome page. This confirms your local server is running.

Step 3: Download WordPress

Step 1: Open your browser and go to wordpress.org/download.

Step 2: Click the Download WordPress button. This downloads a .zip file containing the latest version of WordPress.



Step 3:
Once downloaded, locate the .zip file in your Downloads folder. You will extract it in the next step.

Step 4: Move WordPress Files to the htdocs Folder

The htdocs folder is XAMPP’s web root directory — it is where all locally hosted websites live. Any folder you place inside htdocs becomes accessible through your browser at http://localhost/foldername.

Step 1: Navigate to your XAMPP installation folder. By default this is C:\xampp\htdocs. <cite index=”9-1″>The easiest way to find this folder is to open XAMPP and click the “Open Application Folder” button (or “Explorer” on Windows), then navigate to htdocs from there.</cite>

Step 2: Inside the htdocs folder, create a new folder for your WordPress site. Name it something simple and relevant — for example, mysite, testsite, or myblog. Avoid spaces in the folder name.

Step 3: Go back to your Downloads folder and extract the WordPress .zip file. Right-click the .zip file → select Extract All → choose a location and click Extract.

Step 4: After extraction, you will have a folder named wordpress containing all the WordPress files (wp-admin, wp-content, wp-includes, and others).

Step 5: Open the extracted wordpress folder and select all the files inside it (press Ctrl + A to select all). Copy them (Ctrl + C).



Step 6:
Navigate to your new folder inside htdocs (e.g., C:\xampp\htdocs\mysite) and paste the files there (Ctrl + V).

Important: Make sure the WordPress files — wp-admin, wp-content, wp-includes, and all the individual files like index.php and wp-config-sample.php — are placed directly inside your site folder, not nested inside an extra “wordpress” subfolder inside it. <cite index=”9-1″>The WordPress files should be placed directly inside your site folder — not nested inside an extra subfolder.</cite>

Your htdocs structure should look like this:

C:\xampp\htdocs\mysite\
    wp-admin\
    wp-content\
    wp-includes\
    index.php
    wp-config-sample.php
    (and all other WordPress files)



Step 5: Create a MySQL Database Using phpMyAdmin

WordPress stores all of your site’s content — posts, pages, settings, users — in a MySQL database. Before running the WordPress installer, you need to create an empty database for it to use.

Step 1: Open your browser and go to http://localhost/phpmyadmin (or http://localhost:8080/phpmyadmin if you changed the port).

Step 2: The phpMyAdmin dashboard will open — a visual interface for managing your MySQL databases. No login is required by default on a fresh XAMPP installation.

Step 3: In the left-hand sidebar, click New to create a new database.

Step 4: In the Database name field, type a name for your database. Use something clear and relevant — for example, mysite_db, wordpress_db, or myblog. Avoid spaces; use underscores instead.



Step 5:
Leave the Collation dropdown at its default setting (usually utf8_general_ci or utf8mb4_general_ci — both work fine for WordPress).

Step 6: Click Create. Your new database will appear in the left sidebar — it is currently empty, which is correct. WordPress will populate it during the installation process.

Step 6: Run the WordPress Installation Wizard

With XAMPP running, WordPress files in htdocs, and a database created, you are ready to install WordPress through your browser.

Step 1: Open your browser and go to: http://localhost/mysite (replace “mysite” with the exact folder name you created in htdocs)

Step 2: The WordPress installation wizard will load. The first screen asks you to select your language. Choose your preferred language and click Continue.



Step 3:
The next screen shows a brief introduction explaining that WordPress needs database information. Click Let’s go! to proceed.

Step 4: The database configuration screen appears. Fill in the following fields:

  • Database Name: The name of the database you created in phpMyAdmin (e.g., mysite_db)
  • Username: root (this is the default MySQL username in XAMPP)
  • Password: Leave this blank (XAMPP’s default MySQL installation has no password)
  • Database Host: localhost (leave as default)
  • Table Prefix: wp_ (leave as default, or change it for added security)

Step 5: Click Submit.



Step 6:
WordPress will test the database connection. If successful, you will see a screen saying “All right, let’s go!” — click it to proceed.

If you see a database connection error: Double-check that MySQL is running in the XAMPP Control Panel (it should be green). Confirm the database name matches exactly what you created in phpMyAdmin. Confirm the username is root and the password field is blank.

Step 7: The WordPress installation details screen appears. Fill in the following:

  • Site Title: The name of your local WordPress site (e.g., “My Test Site” — you can change this later)
  • Username: Choose an admin username for your WordPress dashboard login (avoid using “admin” for security)
  • Password: WordPress will suggest a strong password — either use it or create your own. Note it down somewhere safe.
  • Your Email: Enter any email address (since this is local, it does not need to be real)
  • Search Engine Visibility: Check the box to discourage search engines from indexing this site — this is important for local installations, as you do not want a local development site accidentally indexed by Google



Step 8:
Click Install WordPress.

Step 9: WordPress will complete the installation within a few seconds. You will see a “Success!” screen confirming the installation is complete.

Step 10: Click Log In to access your WordPress dashboard.

Step 7: Log In to Your Local WordPress Dashboard

Step 1: You will be redirected to the WordPress login page at: http://localhost/mysite/wp-admin

Step 2: Enter the username and password you set during the installation wizard.

Step 3: Click Log In.


Step 4: You are now inside your local WordPress dashboard — the full, working WordPress admin interface running entirely on your Windows computer. You can install themes, install plugins, create pages and posts, and build your entire website locally without any internet connection or hosting account.

How to Access Your Local WordPress Site

You can access your local WordPress site in two ways:

Frontend (the public-facing website): Go to http://localhost/mysite in your browser

Backend (the WordPress admin dashboard): Go to http://localhost/mysite/wp-admin in your browser

Every time you want to work on your local WordPress site, remember to:

  1. Open the XAMPP Control Panel
  2. Start Apache and MySQL
  3. Then open your browser and navigate to your local site URL

If Apache and MySQL are not running, your local site will not load.

Common Windows-Specific Errors and How to Fix Them

Error: Apache will not start (port 80 conflict)

<cite index=”16-1″>If you install XAMPP and Apache will not start, another application may already be using port 80 — commonly Skype or IIS (Internet Information Services).</cite>

Fix: In the XAMPP Control Panel, click Config next to Apache → open httpd.conf → find Listen 80 and change it to Listen 8080 → save the file and restart Apache. Access your sites at http://localhost:8080 instead.




Alternative fix for IIS conflict:
Open Windows Search → type “Turn Windows features on or off” → uncheck Internet Information Services → click OK → restart your computer.

Error: MySQL will not start (port 3306 conflict)

Another MySQL or database service may already be running on port 3306.

Fix: In XAMPP Control Panel, click Config next to MySQL → open my.ini → find port=3306 and change it to port=3307 → save and restart MySQL.

Error: “Error establishing a database connection”

This is one of the most common WordPress errors on local installations.




Fix checklist:

  • Confirm MySQL is running (green) in XAMPP Control Panel
  • Confirm the database name in wp-config.php matches exactly what you created in phpMyAdmin
  • Confirm the username is root and the password is blank (empty)
  • Confirm Database Host is localhost

Error: WordPress files not found / blank page at localhost/mysite

Fix: Confirm the WordPress files are directly inside the htdocs/mysite folder — not inside an extra wordpress subfolder. The file index.php should be directly at C:\xampp\htdocs\mysite\index.php.

Warning: Windows Firewall blocking Apache or MySQL

When starting Apache or MySQL for the first time, Windows Firewall may show a security alert.




Fix:
Click Allow Access when the Windows Firewall notification appears. If you previously clicked “Block,” go to Windows Firewall settings → Allow an app through Windows Firewall and add Apache and MySQL manually.

Error: Permalinks not working (404 on all pages except home)

<cite index=”16-1″>Apache will not treat files without the correct extension as .htaccess, and permalinks will fail.</cite>

Fix: In the XAMPP Control Panel, click Config next to Apache → open httpd.conf → find the line #LoadModule rewrite_module modules/mod_rewrite.so and remove the # at the beginning to uncomment it → save the file → restart Apache. Then go to WordPress Dashboard → Settings → Permalinks and click Save Changes to regenerate the .htaccess rules.




Best Practices for Your Local WordPress Installation

Create backups regularly. Even on a local site, back up your database from phpMyAdmin periodically. Go to phpMyAdmin → click your database → click Export → click Go to download a SQL backup file.

Use a unique database name and table prefix for each site. If you create multiple local WordPress sites, give each one a unique database and use a unique table prefix (e.g., site1_ or blog1_) to avoid conflicts.

Keep XAMPP updated. New versions of XAMPP include updated PHP versions that improve compatibility with the latest WordPress releases. Check the Apache Friends website periodically for updates.

Do not use your local site for production. A locally hosted XAMPP site is for development and testing only — it is not accessible from the internet and should never be treated as a substitute for proper web hosting.

Test plugins and themes locally first. The primary purpose of a local WordPress installation is to test plugins, themes, and code changes before applying them to your live site. Always test locally before pushing changes live.




Frequently Asked Questions

Is XAMPP free to use?

Yes. XAMPP is completely free and open-source software available for download at apachefriends.org.

Can other people visit my local WordPress site?

No. A locally hosted WordPress site on XAMPP is only accessible from your own computer. It is not connected to the internet and cannot be visited by anyone else unless you specifically configure port forwarding — which is not recommended for development environments.

What is the default MySQL username and password in XAMPP?




The default MySQL username is root and the password is blank (empty — leave the password field empty). These are the credentials you use in the WordPress database configuration screen.

How do I start XAMPP automatically when Windows starts?

In the XAMPP Control Panel, click the red X icon next to Apache and MySQL in the Svc column. This registers them as Windows services that start automatically when your computer boots. Alternatively, add the XAMPP Control Panel to your Windows Startup folder.

Can I have multiple WordPress sites on one XAMPP installation?


Yes. Simply create a new folder in htdocs for each site, add the WordPress files, create a separate database in phpMyAdmin for each, and run the installation wizard for each one. Each site will be accessible at http://localhost/sitename.

What PHP version does XAMPP use?

XAMPP ships with the latest stable PHP version at the time of release. In 2026, current XAMPP versions include PHP 8.2 or 8.3. WordPress 6.x requires PHP 7.4 or higher, so current XAMPP installations are fully compatible.

How do I transfer my local WordPress site to a live hosting server?


The most common method is to use a plugin like Duplicator or All-in-One WP Migration — both create a complete package of your local site that can be uploaded and deployed to a live hosting server. Alternatively, you can manually export the database from phpMyAdmin and transfer the WordPress files via FTP.

Can I install XAMPP and WordPress on Windows 11?

Yes. XAMPP is fully compatible with Windows 11 and the installation process is identical to Windows 10. Follow the same steps in this guide.

Do I need to uninstall XAMPP to remove a local WordPress site?

No. Simply delete the site’s folder from C:\xampp\htdocs and delete its database from phpMyAdmin. XAMPP itself remains installed for future projects.

What is the difference between XAMPP and Local (LocalWP)?


XAMPP is a general-purpose local server stack that requires manual configuration of WordPress. <cite index=”15-1″>Local (formerly LocalWP) is a WordPress-specific tool that many WordPress users prefer for a simpler, WordPress-specific workflow</cite> — it automates much of the setup process and is particularly beginner-friendly. Both are free. This guide covers XAMPP, which gives you a better understanding of how local server environments work.

Share. Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp Email
Previous ArticleiPhone 18 Pro Max Could Be Apple’s Priciest Non-Folding iPhone
Next Article Galaxy S27, S27+ Reportedly Testing 50MP Sony Main Cameras
Onoyri Mokube
  • Website
  • Facebook
  • X (Twitter)
  • Pinterest
  • Instagram

Onoyri Mokube Eseokwea is a software engineer, content creator, and the founder of MokubeTech, where he covers the latest news, reviews, and insights on gadgets, gaming, and technology. With over a decade of experience in the industry, he has collaborated with leading brands and built a reputation for making complex tech easy to understand for everyday readers. Based in Alberta, Canada, Mokube connects with a growing global audience while juggling work, gaming, family, school, and an ever-expanding pile of unopened gadget boxes.

Related Posts

How to Import Amazon Products to WordPress WooCommerce in Bulk (Complete Guide)

August 31, 2026

How to Set Up WooCommerce in WordPress (Complete Beginner’s Guide)

August 31, 2026

How to Make a Transparent Background in Adobe XD (Complete Guide)

August 29, 2026

How to Stop Auto Download in WhatsApp (Step-by-Step Guide)

August 29, 2026
Search
New Arrivals
  • Apple iPhone 13 Apple iPhone 13
  • Apple iPhone 13 mini Apple iPhone 13 mini
  • Apple iPad mini (2021) Apple iPad mini (2021)
  • Apple iPad 10.2 (2021) Apple iPad 10.2 (2021)
  • Apple Watch Edition Series 7 Apple Watch Edition Series 7
  • Apple Watch Series 7 Apple Watch Series 7
LASTEST POST

How to Import Amazon Products to WordPress WooCommerce in Bulk (Complete Guide)

August 31, 2026

How to Set Up WooCommerce in WordPress (Complete Beginner’s Guide)

August 31, 2026

How to Make a Transparent Background in Adobe XD (Complete Guide)

August 29, 2026

How to Stop Auto Download in WhatsApp (Step-by-Step Guide)

August 29, 2026
Facebook X (Twitter) Instagram Pinterest YouTube TikTok Threads
  • Terms and Conditions
  • Contact Us
  • Privacy Policy
  • Past Collaboration
  • About Us
  • Disclaimer
  • Meet the Team
  • Join Our Team
© 2026 MokubeTech. | All rights reserved | If you buy something via one of our affiliate links, Mokubetech may earn a commission.

Type above and press Enter to search. Press Esc to cancel.