Home>Article>CMS Tutorial> What should I do if wp login.php cannot be opened?

What should I do if wp login.php cannot be opened?

藏色散人
藏色散人 Original
2021-05-26 09:48:49 4699browse

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.

What should I do if wp login.php cannot be opened?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn