Update: August 22, 2021
–Using WordPress for a while, I encountered some problems related to wp-admin login. Many times enter forever without accessing the WordPress admin page. Feeling pretty annoyed. And so I tried quite a few different ways and finally I discovered some fixes.
I’m sure you’ll need this too. So the following article will guide you on how to successfully log in to the WordPress Admin admin area.
Table of Contents
1/ Please clear cache and cookies
Sometimes you don’t have to have too much headache but simply clear the cache and cookies. The browser visits many websites, so the large size will result in not being able to store any more data.
Click on the sign 3 chấm
on the right corner of Chrome browser => Lịch sử
or press shortcut Ctrl + H
Press Xóa dữ liệu duyệt web
Choose từ trước đến giờ
and tick 3 empty cells => Press xóa dữ liệu
When you’re done, you can log in again to see if you can. If not, try the second method!
2/ Change admin password via phpMyAdmin
Maybe you forgot your password because you haven’t logged in for a long time. Or turn on Cap lock without noticing. Or the password when re-typed is opening Unikey Vietnamese.
To do this, please Login to Cpanel on Hosting. If you do not know how to use Cpanel, please read the article https://quachquynh.com/huong-dan-su-dung-cpanel/
In Cpanel find the word phpmyadmin and click (If on Localhost, go to http://localhost/phpmyadmin/)
Tick the + sign => Click wp_users => Edit
In user_pass
where varchar(255) you choose MD5
=> Then type the password in the box next to it
Then try Login to wp-admin to see how the result.
3/ File .htaccess code error
The .htaccess role is important to perform many tasks such as security, redirects, path structure etc. But it can also cause errors if the wrong code is added.
To do this, visit Cpanel on Hosting => File Manager
=> Click thư mục tên miền
or in public_html
(At Localhost, go to C:xampphtdocsdomain)
Change to another name and then Login. If that doesn’t work, the cause is not .htaccess.
4/ User authorization error
Make sure the wp-admin folder is 0755 authorized.
To reset permissions you right click on the folder => Change Permissions
5/ Security plugin to block access
The reason why you can’t log in to wp-admin can also be due to some security plugin blocking you. If you are installing a plugin like iThemes, Wordfence, please rename it.
Access public_html/wp-content/plugins
=> Rename the plugin to another name or delete it.
6/ The login path has been changed to another name
To limit Brute Force Attacks, we often change the login path to a new URL. If in case you don’t remember then consider again:
- Plugin: see if you use any plugin to change the login path
- Check the .htaccess file for any redirect code
- Go to the functions.php file to see if there is a redirect code
7/ Update the URL in the file wp-config.php
Go to the file wp-config.php and edit it
define("WP_HOME','http://www.domain-cua-ban.com'); define('WP_SITEURL','http://www.domain-cua-ban.com');
Above are 7 ways to help you fix the situation of not being able to login to wp-admin. Try the methods I gave above one by one. If it still does not work, please contact the Hosting provider so that they can solve it for you.