Home / Localhost / WordPress admin

localhost/wordpress/wp-admin: log in to local WordPress

How to open the WordPress admin on localhost, and fix redirects, database errors and password resets.

Open this address: http://localhost/wordpress/wp-adminThis opens on your own computer. It only works if the program is running.

To log in to a WordPress site on your own computer, open localhost/wordpress/wp-admin. The word after localhost is the folder where you installed WordPress.

A browser opening a local WordPress address, served from the htdocs folder of your local web server

How to open phpMyAdmin

  1. Start Apache and MySQL.
  2. Open http://localhost/wordpress/wp-admin, or /wp-login.php. The part after localhost is the folder name inside htdocs.
  3. If you installed in htdocs itself, the address is just http://localhost/wp-admin.

Useful WordPress fixes

wp-config.php: fix the site address
define('WP_HOME', 'http://localhost/wordpress');
define('WP_SITEURL', 'http://localhost/wordpress');
WP-CLI: set a new password
wp user update admin --user_pass=NewStrongPass123

If WordPress admin will not open

Redirects to the wrong address or a live site
WordPress stored a different address. Add the two lines above to wp-config.php.
Error establishing a database connection
MySQL is not running, or wp-config.php has the wrong details. On XAMPP: user root, empty password.
Password reset email never arrives
Localhost cannot send email. Reset it in phpMyAdmin, in the wp_users table, or use WP-CLI as shown above.
Pages show 404 after changing permalinks
Enable mod_rewrite and set AllowOverride All. See the Apache virtual host generator.
The login page loops back to itself
Clear the cookies for localhost, and check that the site address in the database matches the address you use. A mismatch between localhost and 127.0.0.1 causes this.
White screen after login
A plugin or theme caused an error. Rename the plugins folder inside wp-content to stop all plugins, then log in again.

Questions about WordPress admin

What is the WordPress admin URL on localhost?
http://localhost/wordpress/wp-admin, where "wordpress" is the folder name inside htdocs.
Why can't I reset my WordPress password on localhost?
Localhost cannot send email. Change the password in phpMyAdmin or with WP-CLI.

Updated 2026-10-20

Related pages