localhost/wp-admin — WordPress Admin Login
Access your local WordPress dashboard at localhost/wp-admin to manage posts, pages, themes, plugins, and settings. This is the admin control panel for WordPress sites running on XAMPP, WAMP, MAMP, or Laragon. If WordPress is in a subfolder, use localhost/foldername/wp-admin instead.
WordPress Admin URLs
The URL depends on where you installed WordPress:
| WordPress Location | Admin URL | Login URL |
|---|---|---|
| htdocs/ (root) | localhost/wp-admin | localhost/wp-login.php |
| htdocs/wordpress/ | localhost/wordpress/wp-admin | localhost/wordpress/wp-login.php |
| htdocs/mysite/ | localhost/mysite/wp-admin | localhost/mysite/wp-login.php |
| MAMP (default) | localhost:8888/wp-admin | localhost:8888/wp-login.php |
What You Can Do in wp-admin
- Posts & Pages — Create, edit, and delete content
- Media Library — Upload and manage images, videos, files
- Appearance — Change themes, customize design, manage menus
- Plugins — Install, activate, and configure plugins
- Users — Manage admin accounts and permissions
- Settings — Configure site URL, permalinks, reading options
- Tools — Import/export data, site health check
wp-admin Not Working? Troubleshooting
404 Not Found
Cause: WordPress is in a subfolder, not htdocs root.
Fix: Find which folder contains wp-admin:
# Check htdocs for WordPress folders
C:\xampp\htdocs\ → localhost/wp-admin
C:\xampp\htdocs\wordpress\ → localhost/wordpress/wp-admin
C:\xampp\htdocs\blog\ → localhost/blog/wp-admin
Login Redirect Loop
Cause: Site URL in database doesn't match localhost.
Fix: Add to wp-config.php before "That's all, stop editing!":
define('WP_HOME', 'http://localhost/wordpress');
define('WP_SITEURL', 'http://localhost/wordpress');
Error Establishing Database Connection
Cause: MySQL not running or wp-config.php has wrong credentials.
Fix: Check wp-config.php:
define('DB_NAME', 'wordpress'); // Your database name
define('DB_USER', 'root'); // Usually 'root' for local
define('DB_PASSWORD', ''); // Blank for XAMPP/WAMP
define('DB_HOST', 'localhost'); // Or 'localhost:8889' for MAMP
White Screen of Death
Cause: PHP error hidden.
Fix: Enable debugging in wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', true);
Forgot Password? Reset via phpMyAdmin
- Open localhost/phpmyadmin
- Select your WordPress database (usually "wordpress")
- Click on wp_users table
- Click Edit next to your user
- Find
user_passfield - In the "Function" dropdown, select MD5
- Replace the value with your new password
- Click Go to save
Or run this SQL query:
UPDATE wp_users
SET user_pass = MD5('yournewpassword')
WHERE user_login = 'admin';
Create Admin User via phpMyAdmin
If you need to create a new admin user:
INSERT INTO wp_users (user_login, user_pass, user_email, user_registered)
VALUES ('newadmin', MD5('password123'), 'admin@localhost.com', NOW());
INSERT INTO wp_usermeta (user_id, meta_key, meta_value)
VALUES (LAST_INSERT_ID(), 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');
INSERT INTO wp_usermeta (user_id, meta_key, meta_value)
VALUES (LAST_INSERT_ID()-1, 'wp_user_level', '10');
Useful wp-admin URLs
| Page | URL |
|---|---|
| Dashboard | /wp-admin/ |
| All Posts | /wp-admin/edit.php |
| Add New Post | /wp-admin/post-new.php |
| All Pages | /wp-admin/edit.php?post_type=page |
| Themes | /wp-admin/themes.php |
| Plugins | /wp-admin/plugins.php |
| General Settings | /wp-admin/options-general.php |
| Permalinks | /wp-admin/options-permalink.php |