How to Install WordPress Locally Using XAMPP on Windows

Install WordPress Locally Using XAMPP on Windows
Installing WordPress on your own computer gives you a private environment for learning WordPress, testing themes and plugins, building a site before launch, or practising changes without affecting a live website. XAMPP provides the local web-server components needed for this: Apache, PHP and MariaDB, along with tools such as phpMyAdmin.
This updated walkthrough focuses on Windows. It replaces the old XAMPP 5.6 and WordPress 2.8 references in the original tutorial with current requirements and a complete installation process. The exact installer screens can change between XAMPP releases.
Important: XAMPP is intended for local development and testing, not for hosting a public production website. Keep the services and database tools restricted to your own computer.
Current WordPress and XAMPP requirements
WordPress currently recommends PHP 8.3 or newer and either MariaDB 10.11 or newer or MySQL 8.0 or newer. Apache is a recommended web server. Check the official WordPress requirements before installing, because requirements can change.
When checked on 8 November 2026, the official Apache Friends Windows download page listed XAMPP packages with PHP 8.5.12, 8.4.27 and 8.3.36. The listed packages included Apache 2.4.65 and MariaDB 10.11.16. Choose a current stable package that meets WordPress’s requirements and is compatible with the themes and plugins you plan to use. See the official XAMPP downloads for the latest available builds.
- A Windows computer with permission to install software.
- A current XAMPP installer downloaded from Apache Friends.
- The current WordPress ZIP package from WordPress.org.
- A web browser and a text editor for configuration if needed.
Step 1: Download XAMPP from Apache Friends
Open the Apache Friends download page and choose the Windows installer for a current supported release. Download it from the link provided on the official page; avoid unofficial repackaged installers.
XAMPP includes Apache, PHP and MariaDB. The Windows Control Panel may still label the database module as MySQL, but current XAMPP packages ship MariaDB instead of Oracle MySQL. The commands and tools are largely compatible, but the database engine is MariaDB.
Step 2: Install XAMPP on Windows
- Open the downloaded installer. If Windows displays a User Account Control prompt, review it and allow the installer only if you obtained it from the official Apache Friends source.
- Follow the setup wizard and select the components you need. For a basic WordPress installation, keep Apache, the database component, PHP and phpMyAdmin selected.
- Choose an installation folder. The common path is
C:\xampp; using a short, easy-to-find folder can make later instructions simpler. - Complete the installation and choose to open the XAMPP Control Panel.
The installer layout may look different from the archived screenshots below. Do not disable Windows security features simply to make the installer run. If Windows Firewall asks about network access, do not allow public-network access for a local development server.
Step 3: Start Apache and the database service
In the XAMPP Control Panel, click Start beside Apache and the database module (labelled MySQL in the panel). Wait for both modules to show that they are running.
Open a browser and visit http://localhost/ or http://127.0.0.1/. You should see the XAMPP start page. If it does not load, check the Control Panel messages and Apache logs before changing firewall or service settings.
Step 4: Create a database for WordPress
WordPress stores its posts, pages, settings and other site data in a database. XAMPP includes phpMyAdmin, which provides a browser-based way to manage the local MariaDB database.
- With Apache and the database service running, open
http://localhost/phpmyadmin/. - Open the Databases tab and create a database, for example
wordpress_local. - Choose an available
utf8mb4collation, or keep the suitable default offered by phpMyAdmin. - Create a separate database user for this local WordPress installation and assign that user privileges on the
wordpress_localdatabase. Use a strong password and keep the details for the setup wizard.
A dedicated database user is preferable to using the database administrator account for every application. The WordPress installation documentation explains the database and user requirements in its database creation guide.
Step 5: Download and copy WordPress into the XAMPP folder
- Download the current WordPress ZIP file from WordPress.org/download.
- Extract the ZIP file. It contains a folder named
wordpress. - Copy that folder into XAMPP’s document root:
C:\xampp\htdocs\. - For this example, keep the folder name
wordpress. Your local site address will then behttp://localhost/wordpress/.
You can rename the folder to something shorter, such as mysite, but then use http://localhost/mysite/ in the next step. Apache serves local project files from the htdocs directory by default.
Step 6: Run the WordPress installation wizard
- Make sure Apache and the database service are still running.
- Visit
http://localhost/wordpress/in your browser. - Select your preferred language and continue.
- When WordPress asks for database details, enter the database name, the dedicated database username and password you created, and
localhostas the database host. - Keep the default table prefix if this is a single local test site, or use a different prefix if you have a specific reason to separate tables. A table prefix is not a substitute for a strong password or proper access control.
- Submit the details. If the connection succeeds, continue to the site setup screen.
- Enter a site title, create a unique administrator username (avoid the predictable name
admin), set a strong password and provide an email address for the local installation. - Complete the installation and open the login screen.
WordPress can create the wp-config.php file during the setup process when the file is not already present. You do not normally need to edit it manually for this basic installation. For more detail, see the official WordPress installation guide.
Step 7: Log in to your local WordPress Dashboard
After installation, open http://localhost/wordpress/wp-admin/ and sign in with the administrator username and password you created. You can now install themes and plugins, create pages, change settings and test your site locally.
Remember that this is a separate local installation. It does not automatically publish changes to a live WordPress website. If you later move the local site to hosting, use a proper migration or backup-and-restore process and check the site URLs, database and file paths.
Archived XAMPP screenshots from the original tutorial
The following images are retained from the original tutorial and were uploaded in 2017. They are included for historical reference; current XAMPP installers and Control Panel screens may look different.




Common XAMPP and WordPress installation problems
Apache will not start
Another application or web server may already be using Apache’s default HTTP port 80 or HTTPS port 443. XAMPP’s Windows FAQ identifies other web servers, including IIS, as possible causes. Check the Apache error log and identify which process is using the port before changing settings. Do not randomly stop Windows services or disable the firewall. If you change Apache to use a different port, include that port in the local address, for example http://localhost:8080/.
The database service will not start
Another database service may already be using port 3306, or the MariaDB data directory may have an issue. Read the database log in the XAMPP Control Panel and check whether another MySQL or MariaDB service is running. Do not delete or replace the database data folder as a first troubleshooting step; back it up before attempting recovery.
WordPress says it cannot connect to the database
Confirm that the database service is running and that the database name, username, password and host match the values you created. Check that the database user has privileges on the correct database. For a local XAMPP setup, the host is normally localhost.
The browser shows a 404 or the XAMPP start page instead of WordPress
Check that the WordPress folder is inside C:\xampp\htdocs\ and that the address includes the exact folder name. For example, a folder named wordpress should open at http://localhost/wordpress/.
phpMyAdmin is unavailable
Confirm that Apache and the database service are running, then open http://localhost/phpmyadmin/. Keep phpMyAdmin restricted to localhost. Apache Friends warns that enabling remote access to phpMyAdmin can create a serious security risk.
Security tips for a local XAMPP installation
- Use XAMPP only for development and testing; Apache Friends explicitly says it is not intended for production use.
- Do not expose the XAMPP Control Panel, phpMyAdmin or database service to the public internet.
- Use a dedicated database user with a strong password instead of relying on an unrestricted administrator account.
- Do not create public firewall rules or router port forwards for a local WordPress test site.
- Keep XAMPP, WordPress, themes and plugins updated, and use backups before experimenting with important files or databases.
- Stop Apache and the database service from the Control Panel when you have finished working.
Frequently asked questions
Does XAMPP include MySQL?
Current XAMPP packages ship MariaDB rather than Oracle MySQL. The Control Panel may still use the label MySQL, and many of the familiar commands and tools work with both.
Do I need to install WordPress separately?
Yes. XAMPP provides the local web-server environment, PHP and database service. You still need to download the WordPress package, copy it into the XAMPP document root and run the WordPress installation wizard.
Can I access my local WordPress site from another computer?
A standard localhost address refers to the computer you are using. Access from another device requires additional network configuration and security controls. For a beginner’s local setup, keep the site accessible only from the same computer.
Can I use XAMPP to host a live WordPress website?
No. XAMPP is designed for development, not production hosting. Use a properly managed hosting environment that meets WordPress’s current server and security requirements for a public website.
Conclusion
With XAMPP installed, Apache and MariaDB running, a database created in phpMyAdmin and WordPress copied into htdocs, you can build a local WordPress site on Windows. This environment is useful for learning, theme and plugin development, and testing changes before they reach a live website. Keep it local, follow current version requirements and use a secure migration process when you are ready to move a project to hosting.
Official references and related tutorials
- Apache Friends: Download XAMPP
- Apache Friends: Windows FAQs and security guidance
- WordPress: Server requirements
- WordPress: How to install WordPress
- WordPress: Creating a database






Thanks its really helpful.
Thank you…………………