🖥️ How to Install WordPress on XAMPP (Step-by-Step Guide)
If you want to run a WordPress website locally on your computer without buying hosting, then installing WordPress on XAMPP is the best way to start. Let’s walk through the complete setup process with diagrams and file structure explanations.
🔄 Workflow Overview
[You (Browser)]
↓
[Localhost via XAMPP]
↓
[Apache Server serves WordPress]
↓
[WordPress connects to MySQL Database]
✅ Step 1: Install XAMPP
- Download XAMPP from apachefriends.org
- Install it on your system.
- Open the XAMPP Control Panel and start Apache and MySQL.
+--------------------------+
| Apache [Start] |
| MySQL [Start] |
+--------------------------+
✅ Step 2: Download and Place WordPress
- Download WordPress from wordpress.org.
- Extract the ZIP file.
- Copy the
wordpress
folder intoC:\xampp\htdocs\
C:\xampp\htdocs\wordpress\
✅ Step 3: Create Database in phpMyAdmin
- Open your browser and go to: http://localhost/phpmyadmin
- Click on Databases
- Enter database name like
wpdemo
and click Create
+-------------------------------+
| Database Name: [wpdemo] |
| [Create] |
+-------------------------------+
✅ Step 4: Run WordPress Installation
- Go to
http://localhost/wordpress
- Choose a language
- Enter the following DB info:
Database Name: [wpdemo]
Username: [root]
Password: [ ]
Database Host: [localhost]
Table Prefix: [wp_]
Click Submit → Run the Installation → Fill site info → Install WordPress
Login URL: http://localhost/wordpress/wp-admin
📁 WordPress File Structure
wordpress/ ├── wp-admin/ → Admin dashboard ├── wp-content/ → Themes, plugins, uploads │ ├── themes/ │ ├── plugins/ ├── wp-includes/ → Core WordPress files ├── wp-config.php → DB config
🗃️ WordPress Database Tables
wp_posts
→ Posts and Pageswp_users
→ User Accountswp_comments
→ Commentswp_options
→ Site Settings
🧠 How Everything Works Together
[Browser: http://localhost/wordpress]
↓
[Apache reads PHP files]
↓
[wp-config.php connects to MySQL]
↓
[MySQL sends post/page data]
↓
[WordPress renders page]
📤 Move to Live Server (Optional)
Once your site is ready, you can:
- Export DB via phpMyAdmin
- Move WordPress folder to live server
- Use plugin like All-in-One WP Migration
📌 Quick Summary Table
Task | Tool/URL |
---|---|
Install local server | XAMPP |
Create database | phpMyAdmin |
WordPress files | C:\xampp\htdocs\wordpress |
Run site | localhost/wordpress |
Admin login | /wp-admin |
💡 Tip: Use this local setup to build your theme, test plugins, and learn WordPress before going live!
0 Comments