Home>Article>CMS Tutorial> What should I do if wp login.php cannot be opened?
Solution to the problem that wp login.php cannot be opened: 1. Find the "pluggable.php" file in the "wp-includes" folder; 2. Add the code as "setcookie($auth_cookie_name, $auth_cookie. ..)" can be used.
The operating environment of this article: windows7 system, WordPress version 5.4.2, DELL G3 computer
wp login.php cannot be opened?
I have also encountered this problem in the past few days. I have always logged in through ../wp-login.php without any problems. I covered the theme in the background and an error occurred. It always says Log in to return to the home page! Helpless, I asked many experts and searched many results on Baidu. The final solution is as follows:
Find the pluggable.php file in the wp-includes folder. On line 680, find the following code:
setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
Then add the following code on line 681:
setcookie($auth_cookie_name, $auth_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure, true);
Uploading the overlay will solve the problem.
Note, if this problem still cannot be solved, please use ../wp-admin/index.php to log in!
Recommended learning: "WordPress Tutorial"
The above is the detailed content of What should I do if wp login.php cannot be opened?. For more information, please follow other related articles on the PHP Chinese website!