Setting up WordPress on a local server is a convenient way to test websites, try new themes, or develop plugins without spending money on hosting services. Hereโs a step-by-step guide to installing WordPress on XAMPP localhost on Windows 11 PCs in 2025.
Step 1: Download and Install XAMPP
- Download XAMPP: Visit the official XAMPP website and download the latest version for Windows.
- Install XAMPP:
- Run the downloaded installer.
- Follow the on-screen instructions and choose the components you need. Ensure that “Apache” and “MySQL” are selected.
- Choose the installation directory (default is
C:\xampp
). - Complete the installation and start the XAMPP Control Panel.
Step 2: Start Apache and MySQL
- Open the XAMPP Control Panel.
- Start the Apache and MySQL modules by clicking the “Start” buttons next to them. Ensure both modules are running.
- Check if XAMPP is working by typing
http://localhost
in your browser. You should see the XAMPP dashboard.
Step 3: Download WordPress
- Go to the official WordPress website and download the latest WordPress zip file.
- Extract the contents of the zip file.
Step 4: Create a Database
- Open your browser and go to
http://localhost/phpmyadmin
. - Click on “Databases” in the top menu.
- Enter a name for your database (e.g.,
wordpress_db
) and select “utf8mb4_general_ci” as the collation. - Click “Create.”
Step 5: Move WordPress Files to XAMPP
- Navigate to the XAMPP installation directory (
C:\xampp\htdocs
). - Create a new folder (e.g.,
mywordpress
). - Copy the extracted WordPress files into this folder.
Step 6: Configure WordPress
- Open your browser and type
http://localhost/mywordpress
(replacemywordpress
with your folder name). - WordPress will prompt you to create a
wp-config.php
file. Click “Create a Configuration File” and proceed. - Enter the database details:
- Database Name: The name you created in phpMyAdmin (e.g.,
wordpress_db
). - Username:
root
(default for XAMPP). - Password: Leave blank (default for XAMPP).
- Database Host:
localhost
. - Table Prefix:
wp_
(or any prefix you prefer).
- Database Name: The name you created in phpMyAdmin (e.g.,
- Click “Submit” and then “Run the Installation.”
Step 7: Complete WordPress Installation
- Fill in the required details:
- Site Title: Your siteโs name.
- Username: The admin username youโll use to log in.
- Password: A strong password for the admin account.
- Your Email: An email address for recovery and notifications.
- Choose whether to discourage search engines (optional for local setups).
- Click “Install WordPress.”
Step 8: Log in to Your WordPress Dashboard
- After successful installation, go to
http://localhost/mywordpress/wp-admin
. - Log in with the credentials you just created.
Tips and Troubleshooting
- Port Issues: If Apache wonโt start, another application might be using port 80. Change the port settings in XAMPP (e.g., to 8080) and access XAMPP using
http://localhost:8080
. - File Permissions: Ensure the
htdocs
folder and its subdirectories have appropriate read/write permissions. - Backup Database: Regularly export your database from phpMyAdmin if working on a long-term project.
Conclusion
By following these steps, you can successfully install WordPress on XAMPP localhost on your Windows 11 PC. This setup is perfect for experimenting with WordPress features or developing your website locally before deploying it online. Happy developing!
Rate post