Why install WordPress Offline? Installing WordPress offline (localhost) with XAMPP gives you a safe, fast development environment. Where you can build themes, test plugins, or learn WordPress without paying for hosting. Local installs are perfect for experimenting, developing custom sites, or making backups before pushing changes live.
If you want to learn how to install WordPress Offline (Localhost) with XAMPP in 7 Steps? This guide describe you how to set up WordPress on your computer for free, without hosting. It’s perfect for testing themes, building sites, or practicing WordPress safely before going live.
What you’ll need (quick checklist)
- A computer (Windows 10/11, macOS, or Linux).
- XAMPP (Apache, MariaDB/PHP) is installed. Apache Friends
- WordPress ZIP (latest release). WordPress.org
- Basic comfort using File Explorer / Terminal and a web browser (Chrome, Edge, or Firefox).
How to Install WordPress: Step-by-Step Guidelines
Step 1: Download and install XAMPP
- Open your browser and navigate to the official XAMPP download page at apachefriends.org. Choose the installer that matches your operating system and PHP version preference, then download the installer. Apache Friends
- Run the installer and follow the wizard. On Windows, it’s best to run the XAMPP Control Panel as Administrator when starting services for the first time, which avoids permission problems. Make WordPress
Tips for USA Windows users: If a firewall prompt appears, allow Apache and MySQL network access for private networks so localhost
it works smoothly.
Step 2: Start Apache and MySQL
Open the XAMPP Control Panel and click Start for Apache and MySQL. When both services show “Running” (green), your local server and database are live.
If you encounter port conflicts (port 80/443 for Apache or 3306 for MySQL), either stop the conflicting app (Skype, IIS) or change Apache/MySQL ports in XAMPP settings.
Step 3: Download WordPress
Go to wordpress.org/download/ and download the latest WordPress ZIP file. Use the stable release for development. WordPress keeps frequent updates, so downloading the official package ensures security and compatibility. WordPress.org+1
Step 4: Extract and move WordPress into htdocs
- Extract the ZIP to get the
wordpress
folder. - Move or copy the extracted folder into the XAMPP
htdocs
directory:- Windows default:
C:\xampp\htdocs\
- macOS default:
/Applications/XAMPP/htdocs/
- Linux default:
/opt/lampp/htdocs/
- Windows default:
- Rename the folder if you want a custom local site URL (e.g., rename
wordpress
→my-local-site
So the installer URL becomeshttp://localhost/my-local-site
).
Step 5: Create a database with phpMyAdmin
- In your browser, open:
http://localhost/phpmyadmin/
. phpMyAdmin provides an easy web UI for MySQL/MariaDB. phpMyAdmin - Click Databases, type a database name (e.g.,
wordpress_db
), and click Create. That’s all you need for WordPress’s database. (You can create a dedicated DB user later for better security.)
Step 6: Run the WordPress installer (connect DB)
- Open:
http://localhost/your-folder-name/
(replaceyour-folder-name
withwordpress
or the folder name you used). - Choose your language, then on the database step, enter:
- Database Name:
wordpress_db
(or your chosen name) - Username:
root
- Password: leave it blank (default XAMPP installs often ship with no root password) — you can set/change this later. Kinsta®
- Database Host:
localhost
- Table prefix:
wp_
(or custom)
- Database Name:
- Click Submit → Run the install and finish site setup (site title, admin username, password, email).
Important: By default, XAMPP often has an empty root
password for MySQL on local installs. For security and realistic staging, set a root password and update phpMyAdmin/XAMPP config as needed (see Troubleshooting & Security below).
Step 7: Log in and test
After a successful install, you’ll see the “Success!” screen with a link to the login page. Log in at http://localhost/your-folder-name/wp-admin/
using the admin credentials you created, then verify themes, permalinks (Settings → Permalinks), and a test post or two.
Troubleshooting (quick fixes)
- Ports 80/443 already in use: Stop the conflicting app (IIS, Skype) or change Apache ports in XAMPP’s config. Apache Friends
- MySQL won’t start: Ensure there’s no separate MySQL/MariaDB service running; if there is, stop it via Services (Windows) or change the XAMPP MySQL port. See StackOverflow/Docs for common fixes. Stack Overflow
- phpMyAdmin asks for a password: If you set a root password, update
xampp/phpMyAdmin/config.inc.php
or switch the auth typecookie
so phpMyAdmin prompts for credentials. Guides explain how to update the config after changing passwords.
Security notes (local dev best practices)
- Even though localhost is private, set a strong MySQL
root
password and create a separate limited DB user for WordPress to mimic production. Kinsta and other reputable hosts recommend changing the default blank root password on XAMPP. Kinsta® - Don’t use localhost copies as long-term production storage. Use them for development and testing, then push to a secure, managed host for live sites. WordPress Developer Resources
Short FAQ
Q: Can I use XAMPP on Windows 11?
A: Yes, XAMPP supports Windows 10/11; run the XAMPP Control Panel as Administrator when starting services. Make WordPress
Q: Where do I download XAMPP and WordPress?
A: Download XAMPP from apachefriends.org and WordPress from wordpress.org/download/. WordPress.org
Q: Why is my MySQL password blank on XAMPP?
A: XAMPP commonly ships with an empty root
password for local convenience. Change it for security or when mirroring production. Kinsta®
Check Our Youtube Video: How to Install WordPress in Localhost XAMPP | Bangla Tutorial | HAMIM IT – Part 4