Learn how to install WordPress on localhost using XAMPP, WAMP, or Local by Flywheel. Follow this easy step-by-step guide to create your WordPress website offline. Welcome to Poly Notes Hub, a leading destination for engineering notes for diploma and degree engineering students.
Author Name: Arun Paul.
What is Localhost in WordPress?
A localhost acts as a local server environment on your computer. It lets you run and test WordPress just like a live website, but everything stays offline on your system.
You can install themes, try plugins, and design your website without any hosting cost. Once you’re satisfied with your setup, you can migrate the site to a live server.
Tools You Can Use to Install WordPress Locally
There are three major tools used to create a local WordPress environment –
- XAMPP – Works on Windows, macOS, and Linux. Click Here to Visit the Official Site.
- WAMP – Best suited for Windows users. Click Here to Visit the Official Site
- Local by Flywheel – A beginner-friendly tool with an easy interface. Click Here to Visit the Official Site.
1. How to Install WordPress on Localhost Using XAMPP (Step by Step Method)
Step 1: Download and Install XAMPP

- Go to www.apachefriends.org/download.html
- Download XAMPP for your operating system.
- Install and launch the XAMPP Control Panel.
- Start both Apache and MySQL services.


Step 2: Create a Database

- Visit https://localhost/phpmyadmin/ in your browser.
- Click Databases → Create New Database.
- Enter a database name, for example wordpress_local, and click Create.
Step 3: Download WordPress

- Go to wordpress.org/download.
- Download and unzip the WordPress package.
- Move the extracted folder to C:\xampp\htdocs.
- Rename the folder to your site name (for example, mywebsite).
Step 4: Run the WordPress Installation
- Open your browser and visit https://localhost/mywebsite/.
- Choose your preferred language and click Continue.
- Enter the following database information:
- Database Name: wordpress_local
- Username: root or admin
- Password: setup password or leave blank
- Click Submit → Run the Installation.
- Add your site title, username, password, and email, then click Install WordPress.
Your WordPress site is now successfully installed on your local system using XAMPP. After successful installation, you can log in using the Username and Password that you set up during installation.
Login Link: https://localhost/mywebsite/wp-admin

Here we have listed two methods of installing WordPress on Localhost using WAMP and Flywheel. But the XAMPP one is used most.
2. How to Install WordPress on Localhost Using WAMP
Step 1: Download and Install WAMP
- Visit wampserver.com.
- Download and install WAMP for Windows.
- Open WAMP and ensure the icon in the taskbar turns green, indicating the server is running.
Step 2: Create a Database
- Go to https://localhost/phpmyadmin/.
- Create a new database (for example, wp_local).
Step 3: Add WordPress Files
- Download WordPress from wordpress.org.
- Extract and move the files to C:\wamp64\www\yourfoldername.
- Open your browser and visit https://localhost/yourfoldername/.
- Follow the installation wizard as you did for XAMPP.
You have now installed WordPress locally using WAMP.
3. How to Install WordPress Using Local by Flywheel
Step 1: Download Local by Flywheel
- Go to localwp.com.
- Download and install the free version.
Step 2: Create a New WordPress Site
- Open Local and click Create a New Site.
- Enter your site name and choose a local path.
- Select Preferred Environment (PHP version, MySQL, etc.).
- Enter your WordPress username and password.
Step 3: Launch Your Local WordPress Site
- Click Start Site and then Open Site.
- Local will automatically set up your WordPress dashboard.
WordPress is now installed and ready to use on your local machine.
Why Use Localhost for WordPress Development?
Using localhost provides multiple advantages for developers and students:
- No hosting or domain required.
- Completely free to use.
- Test plugins, themes, and code changes safely.
- Faster development environment.
- Great for learning WordPress without risks.
Common Issues and Fixes
Issue | Solution |
---|---|
Apache/MySQL not starting | Change port numbers or close conflicting apps like Skype |
Database connection error | Verify your database name, username, and password |
Blank screen or PHP error | Increase PHP memory limit in the php.ini file |
Slow performance | Disable unused PHP extensions in XAMPP/WAMP |
Conclusion
Installing WordPress on localhost is the first step for anyone learning or developing WordPress websites. Whether you use XAMPP, WAMP, or Local by Flywheel, each tool offers an easy and reliable way to create a WordPress site offline.
With this setup, you can practice WordPress development, customize themes, and test plugins — all without spending any money on hosting.