wp-login Page Not Found is a well known common issue that usually happens after an update. But the worst fear is that a hacker has taken control of your site and locked you out. In the case of a VPS/Cloud server or a dedicated server, you should SSH to your server and check the logs to exclude any malicious attempt.
To avoid a confusing situation, we suggest maintaining a test or staging website. An upgrade of WordPress is a too serious matter because the plugins or theme may not correctly function after an update.
What Creates This wp-login Page Not Found Error?
Hackers can delete the file is the main fear. If your website is loading properly but you just can not log in, the problem should be simple. WordPress login needs cookies to function properly if your browser settings have disabled cookies, then you will have problems logging in to your WordPress admin dashboard.
/wp-login.php URL is throwing 404, the most important work is to check whether the file is present or not in its original form. You can open the file by using a text editor or via any FTP program like FileZilla. If you have a backup of the file, then you can easily compare it with the present version. Your
wp-login.php file should contain these lines :
// Add these two lines of code (replace example.com with your domain),
// and save the file
Sometimes WordPress plugins can be the culprits behind these 404 errors. Since you don’t have access to
wp-admin, you’ll need to disable the plugins manually by renaming the plugin directory. Also, you can disable the current the by renaming the present theme’s directory.
Also, have a look at the
.htaccess file. Download the existing
.htaccess file so that you have a backup.
Thereafter, delete the
.htaccess file on your server and try to log in. If you can log in then go to Settings → Permalinks and click Save. This will generate a new
Another problem has to do with the error is file permissions. If you have the wrong file permissions for the
wp-login.php file and
wp-admin folder, that can make you viewing 404 error. In general, all WordPress files should be 664 (but not
wp-config.php file, which should be 660) and all folders should be 775.
There can be PHP errors. You should test by running a PHP script.
A whole instance can get vanished in a virtualized environment, it was not uncommon in the old days of OpenVZ! Once I created an instance, installed packages and WordPress and after a couple of days, I found a fresh server. It does happen with other virtualization software. Some peoples complain against Linode and Digital Ocean for such an odd situation. Virtualization does have some compromise but in any case, a backup is a life-saver.
If you have the backup of the MySQL server and wp-content folder, then you can restore the whole site.