In short
If you can't log in to the WordPress admin, first identify the type of problem. If the login page keeps reloading, fix the siteurl and home addresses; for a cookie error, check caching and wp-config settings. If you forgot your password, reset it in phpMyAdmin, and if a security plugin locked you out, rename its plugin folder via FTP or File Manager.
In this guide
- Quick Diagnosis Table
- 1. Redirect Loop: The Login Page Keeps Coming Back
- 2. Cookie Error: "Cookies Are Blocked"
- 3. Forgotten Password: Reset It with phpMyAdmin
- 4. Locked Out by a Security Plugin
- 5. White Screen or Critical Error
- 6. Lost Administrator Privileges
- How to Avoid These Problems in the Future
- Next Step
Being unable to log in to the WordPress dashboard (/wp-admin) almost always comes down to one of five or six familiar causes, and none of them require losing data. The fix starts with reading the symptom correctly: Does the login page keep coming back, does it show an error message, or does it not load at all? Below we cover each scenario with its symptom and show how to fix it without dashboard access, using only phpMyAdmin and FTP or cPanel File Manager.
Quick Diagnosis Table
| Symptom | Likely cause | Fix section |
|---|---|---|
| Returns to the login page after logging in | Wrong site address, HTTP/HTTPS mix-up | Redirect loop |
| "Cookies are blocked" warning | Browser, caching or domain mismatch | Cookie error |
| "Incorrect password" and no reset email arrives | Forgotten password, email not working | Password reset with phpMyAdmin |
| "Too many attempts", 403 or login URL not found | Security plugin lockout | Security plugin |
| White screen or "critical error" | Plugin/theme conflict | Disabling plugins |
Before you start, try an incognito/private window in your browser; if the problem only happens in a normal window, the cause is old cookies in your browser.
1. Redirect Loop: The Login Page Keeps Coming Back
If you keep landing back on wp-login.php even though your username and password are correct, or the browser says "too many redirects" (ERR_TOO_MANY_REDIRECTS), the address WordPress thinks it has doesn't match the address in the browser. The most common cases: a mix-up between the www and non-www address, the address staying http after SSL is installed, or the old domain left in the database after a site migration.
Fix it in wp-config.php
Open wp-config.php with FTP or File Manager and add your own address above the /* That's all, stop editing! */ line:
define( 'WP_HOME', 'https://www.alanadiniz.com' );
define( 'WP_SITEURL', 'https://www.alanadiniz.com' );
These constants override the value in the database; once you're logged in, you can correct the addresses under Settings > General and remove these lines if you like.
Fix it in phpMyAdmin
For a permanent fix, open the wp_options table in phpMyAdmin (your table prefix may differ) and update the option_value of the siteurl and home rows to the correct address. Both values must use the same protocol (https) and the same www preference.
If you're behind a proxy or CDN
If the site is served over HTTPS behind a CDN or reverse proxy but the server is reached over HTTP, WordPress can't tell the connection is secure and an endless loop results. Add this near the top of wp-config.php:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) {
$_SERVER['HTTPS'] = 'on';
}
Also, if a force-HTTPS rule in .htaccess conflicts with the CDN's own redirect, remove one of them. Check the RewriteRule lines in your .htaccess file for the correct rule structure.
2. Cookie Error: "Cookies Are Blocked"
If the login screen shows "Cookies are blocked or not supported by your browser", try these in order:
- Delete the cookies stored for the site in your browser, or try an incognito window.
- If you use a caching plugin, make sure
wp-login.phpand/wp-adminare excluded from the cache. - Check that the address matches
siteurlexactly; awwwdifference makes the cookie get written to the wrong domain. - If the problem continues, add the line that pins the cookie domain to
wp-config.php:
define( 'COOKIE_DOMAIN', false );
A bug in a plugin or in the theme's functions.php that produces output after headers are sent (for example, whitespace at the end of the file) can also stop cookies from being set. In that case you'll see "headers already sent" in the error log.
3. Forgotten Password: Reset It with phpMyAdmin
The "Lost your password?" link is usually enough. But if the site can't send email, the reset link never arrives. In that case you can change the password directly in the database:
- Open phpMyAdmin in cPanel and select the site's database (its name is the
DB_NAMEvalue inwp-config.php). - Open the
wp_userstable and click Edit on your user's row. - In the
user_passfield, choose MD5 in the Function column and type your new password in plain text in the Value column. - Save with Go and log in with the new password.
On first login, WordPress converts the MD5-stored password to its current, secure hash format, so this method is only a temporary bridge. You can do the same with an SQL query:
UPDATE wp_users SET user_pass = MD5('YeniGucluSifre!2026') WHERE user_login = 'admin';
If you don't remember your username either, check the user_login column in the same table. If phpMyAdmin is new to you, first take a backup using the phpMyAdmin database import and export guide. If password reset emails never arrive, also set up SMTP on your site.
4. Locked Out by a Security Plugin
Plugins such as Wordfence, iThemes/Solid Security and Limit Login Attempts can block your IP address after many failed attempts, or may have moved the login page to a custom URL. If you forgot the custom URL, /wp-admin returns 404 or 403. The fix is to disable the plugin temporarily:
- Go to the
wp-content/pluginsfolder with FTP or File Manager. To set up an FTP connection, see the connecting to your hosting with FileZilla guide. - Rename the plugin's folder, for example from
wordfencetowordfence-kapali. - WordPress can't find the plugin, so it deactivates it; log in at the standard
/wp-login.phpaddress. - Rename the folder back, reactivate the plugin in the dashboard, and add your IP address to the allowlist or write down the custom login URL.
Some security plugins also write rules to the .htaccess file. If you still get a 403 after renaming the folder, back up .htaccess and remove the section added by the plugin.
5. White Screen or Critical Error
If the login page is completely blank or you see "There has been a critical error on this website", the problem isn't your login details but a plugin or theme. To disable all plugins at once, rename the wp-content/plugins folder to plugins-kapali, log in, then rename the folder back and activate plugins one by one to find the faulty one. To see the error details, temporarily enable the error log in wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Errors are written to wp-content/debug.log. Turn these lines off once the issue is fixed. If you get a database-related message, go to the "Error establishing a database connection" fix.
6. Lost Administrator Privileges
If you can log in but get "Sorry, you are not allowed to access this page", or Plugins and Settings are missing from the menu, your user's role may be corrupted or may have been changed after an attack. In phpMyAdmin, open the wp_usermeta table and find the row where user_id is your user ID and meta_key is wp_capabilities. The meta_value field should look like this:
a:1:{s:13:"administrator";b:1;}
For the same user, wp_user_level should also be 10. If your table prefix isn't wp_, the key names change with the prefix too (for example, abc_capabilities). If you didn't change your role yourself, this may be a sign of a security breach; also check the user list and recently changed files.
How to Avoid These Problems in the Future
- Keep your admin password in a password manager, and save the security plugin's custom login URL there too.
- Right after installing SSL, update both addresses under Settings > General to
https. - Test your site's email sending; if password reset emails don't arrive, fix it before it becomes a bigger problem.
- Back up files and the database before making changes.
- Keep plugins and themes up to date; most conflicts come from plugins that haven't been updated in years.
- If you have several administrators, give each one a separate account; a single shared admin password increases both lockout and security risk.
Next Step
Almost every fix above relies on phpMyAdmin and File Manager access, so running WordPress on cPanel means you keep the keys to your site even when the dashboard locks you out. Our WordPress hosting plans come with one-click installs through WP Toolkit and a free SSL certificate; setting up SSL correctly from the start removes the most common cause of redirect loops. If you want to move your existing site, choose the WordPress hosting plan that fits you, and if you get stuck, open a support ticket with the Sunucu Atlas support team for help (support is provided in Turkish). To see the differences in RAM, storage and site limits between plans, check the WordPress hosting comparison page.
Frequently asked questions
Why does WordPress send me back to the login page after I log in?
Usually the siteurl and home addresses in the database don't match the address in the browser; an http vs. https or www difference is the most common cause. Fixing the addresses in wp-config.php or phpMyAdmin ends the loop.
How do I reset my WordPress password without email?
In phpMyAdmin, edit your user's user_pass field in the wp_users table, choose MD5 as the Function and type the new password. WordPress converts the password to a secure format on first login.
A security plugin locked me out. What should I do?
Rename the plugin's folder inside wp-content/plugins using FTP or cPanel File Manager. The plugin is deactivated and you can log in at the standard wp-login.php address.
Why does my wp-admin URL return a 404 error?
A security plugin may have moved the login page to a custom URL, or the .htaccess file may be corrupted. Rename the plugin folder and restore .htaccess with the default WordPress rules.
Is the 'cookies are blocked' error caused by my browser?
Sometimes it comes from old cookies in the browser; other times a caching plugin is caching the login page or there's a domain mismatch. Try an incognito window first to tell which one it is.