Overview & Common Causes
A 500 Internal Server Error encountered when visiting
[yourdomain.com/wp-login.php](https://yourdomain.com/wp-login.php) indicates that the web server (Apache) encountered a configuration directive it cannot execute.While general 500 errors across a website can stem from PHP memory limits or plugin conflicts, a 500 error occurring strictly on the
wp-login.php page is most frequently caused by:- Missing Password Authentication Files (
.htaccesspasswd): A custom password protection rule inside the.htaccessconfiguration file references a password file path that no longer exists on the server.
- Legacy Directory Paths Post-Migration: The domain was previously migrated or transferred, and the
.htaccessfile still references an outdated Linux file path (e.g.,/home/username/instead of/var/www/vhosts/[domain.com/httpdocs/](https://domain.com/httpdocs/)).
Our Support Boundary: Hosting Diagnostics vs. Code Maintenance
- What Hosting Support Provides: Server log diagnostics, identifying broken file path directives, resetting WordPress admin credentials via WP Toolkit, and verifying PHP/database connectivity.
- What Belongs to Your Web Developer: Modifying custom site security rules, generating custom
.htaccesspasswdfiles, or rewriting custom.htaccessdirectives for complex application requirements.
Step 1: Identifying the Root Cause in Plesk
- Log into your Plesk Panel.
- Navigate to Files in the left menu and open the httpdocs directory.
- Click on the
.htaccessfile to open the text editor. - Look for an HTTP Basic Authentication rule similar to the following:
<FilesMatch "wp-login.php">
AuthType Basic
AuthName "Secure Area"
AuthUserFile "/home/domain/.htaccesspasswd"
require valid-user
</FilesMatch>- Check whether the file listed under
AuthUserFileactually exists in your server files. If the file is missing or the directory path is outdated from a past server migration, Apache cannot validate the login request and will return a 500 Internal Server Error.
Step 2: Resolving the Error
Depending on your security setup, you or your web developer can resolve this issue using one of the two options below:
Option A: Restore Default WordPress .htaccess Rules (Recommended)
If you wish to remove the secondary HTTP password prompt and restore standard WordPress login functionality:
- Open
.htaccessinside Plesk File Manager (Files > httpdocs).
- Save a backup copy of your current
.htaccesscontents to your local computer.
- Replace the entire contents of
.htaccesswith the official, standard WordPress configuration code (provided by WordPress.org):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress- Click Save or Apply.
- Test
[yourdomain.com/wp-login.php](https://yourdomain.com/wp-login.php)in a new browser window. The login page will now render normally.
Option B: Update the .htaccesspasswd Path (For Custom Security)
If your site requires an additional HTTP Basic Authentication layer before accessing WordPress:
- Update the
AuthUserFilepath in.htaccessto point to the correct, absolute path on your server (e.g.,/var/www/vhosts/[yourdomain.com/httpdocs/.htaccesspasswd](https://yourdomain.com/httpdocs/.htaccesspasswd)).
- Ensure a valid
.htaccesspasswdfile containing encrypted user credentials exists at that exact path.
Step 3: Post-Recovery Environment Checklist
Once access to
wp-login.php is restored, we recommend taking the following maintenance steps:-
Reset Admin Credentials via WP Toolkit:If you or your web contractor do not remember your WordPress login password, navigate to Plesk > WordPress Toolkit > Set Up / Change Password to set a fresh password instantly without accessing the database.
-
Review PHP Environment Compatibility:Legacy WordPress installations experiencing login errors are frequently tied to end-of-life PHP versions (e.g., PHP 5.6). Once your core site files are updated, navigate to Plesk > PHP Settings to upgrade your site to a modern, supported PHP release (PHP 8.1+).
-
Update WordPress Core, Themes, and Plugins:Outdated plugins can introduce security vulnerabilities or conflicts. Run all pending updates directly within the WordPress Toolkit dashboard.
Comments
0 comments
Please sign in to leave a comment.