admin管理员组

文章数量:1333677

I setup a LAMP server on my new laptop and downloaded a website from the live server to my local machine. Everything appears to be working, but I can't login, when I go to http://localhost/mysite/wp-login.php and enter the correct details, it just redirects back to wp-login.php without actually logging in.

I'm using a new WordPress install on my local machine so it's a new wp-config file.

I made sure the site URL is correct in wp_options, I made sure the username and password is correct, I tried downloading the .htaccess file from the live server, I tried defining WP_HOME and WP_SITEURL in the wp-config.php file. I tried changing browser to Chrome (which has no extensions and no cookies or history, I never use Chrome).

I tried adding:

define('FORCE_SSL_ADMIN', false);

to wp-config.php. I tried deleting all plugins.

I don't know what else to try, or how to diagnose the problem.

I setup a LAMP server on my new laptop and downloaded a website from the live server to my local machine. Everything appears to be working, but I can't login, when I go to http://localhost/mysite/wp-login.php and enter the correct details, it just redirects back to wp-login.php without actually logging in.

I'm using a new WordPress install on my local machine so it's a new wp-config file.

I made sure the site URL is correct in wp_options, I made sure the username and password is correct, I tried downloading the .htaccess file from the live server, I tried defining WP_HOME and WP_SITEURL in the wp-config.php file. I tried changing browser to Chrome (which has no extensions and no cookies or history, I never use Chrome).

I tried adding:

define('FORCE_SSL_ADMIN', false);

to wp-config.php. I tried deleting all plugins.

I don't know what else to try, or how to diagnose the problem.

Share Improve this question edited Jul 18, 2020 at 18:29 Don Flannagan asked Jul 15, 2020 at 0:45 Don FlannaganDon Flannagan 1234 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

So I changed this in the wp-config.php file:

define( 'AUTH_KEY',         'put your unique phrase here' );
define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );
define( 'LOGGED_IN_KEY',    'put your unique phrase here' );
define( 'NONCE_KEY',        'put your unique phrase here' );
define( 'AUTH_SALT',        'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT',   'put your unique phrase here' );
define( 'NONCE_SALT',       'put your unique phrase here' );

And added all the hashes from the wp-config.php file on the live server and now it works.

本文标签: WordPress on localhost (LAMP)Can39t loginjust redirects to wploginphp