You can install WordPress locally with XAMPP in six short steps: install XAMPP, start Apache and MySQL, create a database, copy WordPress into the htdocs folder, run the installer at localhost, then set up your site. It is completely free, and nothing you do goes online.
A local install is a private copy of WordPress that runs on your own computer. It is the safest place to learn the Block Editor, test a new theme or plugin, or try a big change before it touches your real site.
This guide was updated for 2026. You will find the full XAMPP method, fixes for the errors people hit most, easier one-click tools if you would rather skip the manual setup, and how ChatGPT, Claude and MCP can help.
Quick answer
- The XAMPP route: install XAMPP, start Apache and MySQL, create a database in phpMyAdmin, copy WordPress into htdocs, then open localhost in your browser.
- Default database login: username root, an empty password and host localhost.
- Current XAMPP builds: PHP 8.3, 8.4 and 8.5 with MariaDB 10.11, which meet WordPress’s recommended requirements.
- Easier option: Local or WordPress Studio create a local site in one click, with no database setup.
- Nothing to install: WordPress Playground runs WordPress in your browser for quick tests.
- What Is a Local WordPress Install?
- XAMPP vs Local vs WordPress Studio vs Playground
- How to Install WordPress Locally With XAMPP (Step by Step)
- How to Fix Common XAMPP Problems
- The Easier Way: One-Click Local WordPress Tools
- How Can ChatGPT and Claude Help You?
- What Should You Do With Your Local Site?
- How Do You Move a Local Site to a Live Host?
- FAQs About Installing WordPress Locally
- Final Thoughts
What Is a Local WordPress Install?
A local WordPress install is a full WordPress site that runs on your own computer instead of a web server. Only you can see it, and you do not need a domain name or a hosting plan.
WordPress needs three things to run: a web server, PHP and a database. XAMPP bundles all three (Apache, PHP and MariaDB) into one free installer from Apache Friends.
Here is why a local site is worth having:
- Learn safely: practice with the Block Editor, menus and settings without any risk to a live site.
- Test before you change: try a new theme, plugin or WordPress update on a copy first.
- Build offline: design a new site on your computer, then move it online when it is ready.
- Pay nothing: XAMPP and WordPress are both free and open source.
A local install always uses the self-hosted WordPress software from WordPress.org. If you are still deciding which version is right for you, read our guide to WordPress.org vs WordPress.com first.
XAMPP vs Local vs WordPress Studio vs Playground
XAMPP is not the only way to run WordPress on your computer anymore. These are the four main free options in 2026 and what each one is best at.
|
Tool |
Best for |
Setup |
Price |
|---|---|---|---|
|
XAMPP |
Learning how WordPress works behind the scenes |
Manual: you create the database and run the installer |
Free |
|
Local |
Beginners and freelancers who want sites fast |
One click, SSL included |
Free |
|
WordPress Studio |
Block themes, previews and AI agent workflows |
A few clicks, with an optional AI agent |
Free |
|
WordPress Playground |
Quick tests with nothing to install |
Runs in your browser |
Free |
Checked on each official site in November 2026.
Pick XAMPP if you want to understand how WordPress, PHP and the database fit together. Pick Local or WordPress Studio if you simply want a working site as fast as possible.
How to Install WordPress Locally With XAMPP (Step by Step)
Follow these six steps. They work the same way on Windows, macOS and Linux; only the folder paths change.
Step 1: Download and Install XAMPP
Go to the XAMPP download page. In November 2026 it offers three builds for Windows, macOS and Linux: PHP 8.3.37, 8.4.28 and 8.5.13, each with Apache 2.4.71 and MariaDB 10.11.19.
If you are not sure which one to pick, choose the PHP 8.4 build. It meets WordPress’s recommendation of PHP 8.3 or newer and sits in the middle of the three versions.
- Windows: run the installer and keep the default components. Install to C:\xampp, not C:\Program Files, where Windows permissions can get in XAMPP’s way.
- macOS: open the .dmg file and run the installer. The current native installer supports Apple silicon Macs and installs to /Applications/XAMPP.
- Linux: make the .run file executable, run it with sudo, and XAMPP installs to /opt/lampp.
Step 2: Start Apache and MySQL
Open the XAMPP Control Panel (or the XAMPP manager app on macOS and Linux) and click Start next to Apache and MySQL. Both turn green when they are running.
XAMPP labels the database “MySQL”, but it actually runs MariaDB, a drop-in replacement that WordPress fully supports.
To test it, open http://localhost in your browser. If you see the XAMPP welcome page, your web server works.
Step 3: Create a Database in phpMyAdmin
- Go to http://localhost/phpmyadmin in your browser.
- Click the Databases tab.
- Type a name such as wordpress, leave the collation as it is, and click Create.
You do not need to create any tables. WordPress adds them for you during installation.
Step 4: Download WordPress and Copy It to htdocs
Download the latest version from WordPress.org and unzip it. Then copy the wordpress folder into XAMPP’s htdocs folder:
- Windows: C:\xampp\htdocs
- macOS: /Applications/XAMPP/htdocs
- Linux: /opt/lampp/htdocs
Rename the folder to your project name, for example mysite. That name becomes part of your local address.
Step 5: Run the WordPress Installer
- Go to http://localhost/mysite (use your folder name).
- Choose your language, click Continue, then click Let’s go!
- Enter Database Name: wordpress, Username: root, Password: leave it empty, Database Host: localhost, Table Prefix: wp_.
- Click Submit, then Run the installation.
- Enter a site title, a username, a strong password and your email address.
- Click Install WordPress and log in at http://localhost/mysite/wp-admin.
If WordPress says it cannot write the wp-config.php file, it shows you the file’s contents. Create a new file named wp-config.php in your site folder, paste the text in, save it and continue.
Tip: do not use “admin” as your username, even locally. Local sites often move online later, and “admin” is the first name attackers guess. Here is how to change an admin username if you already used it.
Step 6: Set Up Your New Local Site
- Go to Settings > Permalinks, choose Post name and click Save Changes.
- Delete the sample post, sample page and plugins you will not use.
- Pick a block theme under Appearance > Themes so you can use the Site Editor.
That is it. Your site now runs at http://localhost/mysite, and it behaves just like a live site: the Block Editor, the Site Editor, plugins and updates all work the same way.
How to Fix Common XAMPP Problems
Most XAMPP problems come from another program, a missing setting or a PHP limit. These fixes solve the ones people run into most.
Apache will not start
Another program is almost always using port 80 or 443