October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Local Development

How to Create a Local WordPress Site Using XAMPP on Windows

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can build a WordPress site on your Windows PC with XAMPP by starting its Apache and database services, placing WordPress in XAMPP’s htdocs folder, creating a database in phpMyAdmin, and completing WordPress’s installer. This guide uses XAMPP for Windows; Linux and macOS installation paths and controls differ. A local XAMPP setup is for learning and development, not a secure public-facing production server.

Check XAMPP and WordPress compatibility first

Apache Friends currently lists Windows XAMPP packages with PHP 8.0.30, 8.1.25, and 8.2.12. The newest listed package is 8.2.12; its bundled components include Apache 2.4.58, MariaDB 10.4.32, phpMyAdmin 5.2.1, and XAMPP Control Panel 3.2.4. WordPress recommends PHP 8.3 or later and MariaDB 10.11 or later, or MySQL 8.0 or later. WordPress can run on older legacy versions, but they are not recommended for production. For a local learning or development site, XAMPP 8.2.12 can still be used.

Check the current package details on the Apache Friends downloads page and WordPress’s server requirements page, since software versions can change.

Install XAMPP on Windows

  1. Open the Apache Friends download page and download the Windows 64-bit installer for the PHP version you want.
  2. Run the installer. Retain at least Apache, MySQL, PHP, and phpMyAdmin. The control panel calls the database module “MySQL,” although current XAMPP packages bundle MariaDB.
  3. Install XAMPP in the default location, normally C:xampp. Avoid C:Program Files when possible: Windows permissions there can make it harder to edit files such as those in htdocs.

See the XAMPP Windows FAQ for installation details and the WordPress Core XAMPP guide for the local-install context.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall

Start Apache and the database service

  1. Open XAMPP Control Panel.
  2. Click Start in the Apache row, then click Start in the MySQL row.
  3. Confirm both rows turn green and show Running.
  4. Visit http://localhost/. If Apache is using its default port, the XAMPP start page should appear.

XAMPP’s default ports are Apache HTTP 80, Apache HTTPS 443, and MariaDB/MySQL 3306. The XAMPP Windows FAQ explains its default configuration.

Place WordPress in XAMPP’s web folder

  1. Download the current ZIP from the official Get WordPress page. Avoid unofficial, modified, or “nulled” packages.
  2. Extract the ZIP. It normally creates a folder named wordpress.
  3. Move that folder into C:xampphtdocs. You can keep the name wordpress or rename it to a project name without spaces, such as mysite.

For the example project name mysite, the files should be in C:xampphtdocsmysite, and the local address will be http://localhost/mysite/. If you keep the folder name, use http://localhost/wordpress/. XAMPP’s default public directory is xampphtdocs; the WordPress Core guide to installing from ZIP describes placing the extracted files locally.

Create a database in phpMyAdmin

  1. Open http://localhost/phpmyadmin/ on the same computer.
  2. Click the Databases tab.
  3. Under Create database, enter a name such as mysite. Choose a Unicode collation if prompted; utf8mb4 is suitable for WordPress.
  4. Click Create, and remember the exact database name for the WordPress installer.

A typical fresh XAMPP setup uses database name mysite, username root, a blank password, and host localhost. Leave the password blank only if the local root account has no password. The database can simply be named mysite; root is the username, not a required prefix for the database name. If you prefer, create a separate database user and grant it all privileges for this WordPress database, as allowed by WordPress installation documentation.

Rank #2
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
  • 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
  • 4GB DDR4 System Memory; 128GB Solid State Drive
  • 11.6" HD (1366 x 768) Multi-Touch Display
  • Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
  • Windows 11 Pro

XAMPP’s basic phpMyAdmin configuration is intended for access from the local computer through localhost or 127.0.0.1. Do not expose phpMyAdmin externally; doing so creates a significant security risk. See the XAMPP Windows FAQ.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run the WordPress installer

  1. Open the project URL: http://localhost/mysite/ if the folder is named mysite, or http://localhost/wordpress/ if you kept the default folder name.
  2. When WordPress asks for database details, enter the database name you created, username root, password blank only if root has no password, database host localhost, and table prefix wp_.
  3. Click Submit. If the database connection succeeds, click Run the installation.
  4. Enter a site title, administrator username, password, and email address. For a local-only site, leave Discourage search engines from indexing this site selected, then click Install WordPress.

WordPress can create wp-config.php during setup when the file does not already exist. Consult the WordPress installation documentation or the Learn WordPress installation lesson for installer details.

Log in and open the local site

Go to http://localhost/mysite/wp-admin/ to sign in if the project folder is mysite. For a folder named wordpress, use http://localhost/wordpress/wp-admin/. The site is available through the local computer unless you deliberately configure network access.

Rank #3
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Configure wp-config.php manually only if needed

Manual configuration is optional. If the installer cannot create the file, or you want to set it up yourself, use a plain-text editor:

  1. In the WordPress folder, copy wp-config-sample.php.
  2. Rename the copy to wp-config.php.
  3. Set the database values to match your local setup. For the example database and a root account without a password:
define( 'DB_NAME', 'mysite' );
define( 'DB_USER', 'root' );
define( 'DB_PASSWORD', '' );
define( 'DB_HOST', 'localhost' );

If root has a password, put it in DB_PASSWORD. Keep DB_CHARSET and DB_COLLATE at their defaults unless you have a specific reason to change them. Save the file in the WordPress root, for example C:xampphtdocsmysitewp-config.php. WordPress documents these settings in its wp-config.php reference and installation documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fix common XAMPP and WordPress setup errors

Apache will not start

Another program may already be using port 80 or 443. Common conflicts include IIS, another Apache installation, Skype or similar communication software, and security software or a firewall. XAMPP may report an error such as (OS 10048)... make_sock: could not bind to address 0.0.0.0:80.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

On Windows, check Computer Management → Services for World Wide Web Publishing Service, associated with IIS. Stop it and set its Startup type to Disabled if you do not need IIS. Alternatively, change Apache’s port in its configuration and include the new port in every URL, for example http://localhost:8080/mysite/. The XAMPP Windows FAQ covers port conflicts.

http://localhost/ does not load

Check that Apache is green and marked Running in XAMPP Control Panel. Try http://127.0.0.1/, or include the configured port, such as http://127.0.0.1:8080/. A firewall or antivirus program can block Apache or localhost traffic; allow Apache and the database server as needed rather than permanently disabling security software. See the XAMPP Windows FAQ.

phpMyAdmin cannot connect to the database

Make sure the XAMPP MySQL row is running; this is the interface label for the bundled MariaDB module. Confirm the username is root and that the password is blank only if you have not set one. If you set a root password, use it in phpMyAdmin and WordPress. A second MySQL or MariaDB server may already be using port 3306; stop one server or configure one to use another port. See the XAMPP Windows FAQ.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
  • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
  • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
  • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
  • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.

WordPress reports “Error establishing a database connection”

Check that the database name, username, password, and host in the installer or wp-config.php match the database you created and the account you intend to use. Confirm the MySQL module is running and another database server is not occupying the expected port. The usual host is localhost; if MariaDB uses a nonstandard port, include it, for example localhost:3307 in DB_HOST. WordPress explains the configuration values in its wp-config.php reference and its installation troubleshooting documentation.

WordPress shows a blank page or PHP error

Check the PHP version supplied with your XAMPP package and whether a theme or plugin is compatible with it. The Windows packages currently listed by Apache Friends use PHP 8.0.30, 8.1.25, or 8.2.12, while WordPress recommends PHP 8.3 or later. To find the PHP configuration Apache loads, open http://localhost/xampp/phpinfo.php and look for Loaded Configuration File. After editing php.ini, restart Apache from XAMPP Control Panel. Version details are on the XAMPP downloads page and XAMPP Windows FAQ.

The XAMPP dashboard appears instead of WordPress

Confirm the WordPress files are directly inside C:xampphtdocsmysite, including C:xampphtdocsmysitewp-adminindex.php. If they are inside an extra wordpress folder, the actual URL is http://localhost/mysite/wordpress/. Move the inner files up one level if you did not intend that nested path. The WordPress Core guide to installing from ZIP covers the expected folder layout.

The installer cannot write wp-config.php

Copy wp-config-sample.php to wp-config.php manually, edit the database values, and save it in the WordPress root directory, such as C:xampphtdocsmysitewp-config.php. This issue is more likely if XAMPP is installed under C:Program Files because of Windows permissions. See the XAMPP Windows FAQ and WordPress wp-config.php documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$249.99
Bestseller No. 2
Dell Latitude 3190 11.6' HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core; 4GB DDR4 System Memory; 128GB Solid State Drive
Bestseller No. 3
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$304.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.