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.
How to open phpMyAdmin
- Start Apache and MySQL.
- Open http://localhost/wordpress/wp-admin, or /wp-login.php. The part after localhost is the folder name inside htdocs.
- If you installed in htdocs itself, the address is just http://localhost/wp-admin.
Useful WordPress fixes
define('WP_HOME', 'http://localhost/wordpress');
define('WP_SITEURL', 'http://localhost/wordpress');wp user update admin --user_pass=NewStrongPass123If 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.
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.