You may encounter many problems with your site that you are trying to fix from within the WordPress control panel, but what if you cannot access the control panel? There are many reasons why you cannot access the WordPress dashboard.
Also, sometimes, you do not see the login screen and you see different error messages, so in this article we will present to you the most common problems when you try to log in to the WordPress control panel for your site (Wp-admin), such as forgetting the password or problems with plugins or templates. , or other problems that prevent you from logging in to WordPress.
There are many problems that cause these problems. We will explain all the causes, and how to use different solutions to confront these problems. The most famous of these problems are the following:
1- Losing the password
If you forget and lose your password, there are 4 solutions to recover or change the old password, as follows:
1.1 Retrieve password by email
You can recover the password and set a new one by clicking on the button (Lost your password?)
Then enter your username or email address, and you will receive a message to your email with instructions on how to reset your password.
1.2 WordPress control panel
If you still have access to the WordPress control panel (Wp-admin). For example, you are using another browser, and you are still connected to the site and have not logged out, or you have another tab and are still connected to the WordPress control panel, or any device that is still connected to the control panel, in this case, you should go to Members << All Members
A window will appear containing all the users on the site, and you must search for the user who forgot the password, and you want to generate a new password for him, then go to this user’s page.
After that, the user’s personal page will open, which contains all of his data, including the password, where you can scroll to the generate password button , and set a new password.
1.3 Using phpMyAdmin
If you are unable to change the password using the previous methods, you can set and change the password by accessing the WordPress database for your site and changing it from there.
First, you must log in to your hosting control panel (Cpanel) , then search for the Database section at the bottom and choose phpMyAdmin .
The page for controlling databases will open, then click on Database to view all databases on the site
Next, you need to select the WordPress database
A new window will open, containing all the tables in the database. You have to search for the users table, and usually the name of the table is (wp_users). Sometimes, if you have changed the table prefix to a prefix other than WP, the table name will be with this name. , for example (example_users)
After that, click on Browse to open the table and edit it
A new page will open containing all the users on the site, where you must choose the user whose password you forgot and click on: Edit
A new window will open for us, containing all the values and data for the user. What matters to us is changing the password field only, as in the picture, by changing the password and then press Go.
This way, you have changed your password, so you can try logging in again with the new password.
1.4 Using the functions.php file
You can reset your password by accessing the functions.php file by connecting to the FTP program, then going to the path: Public_html >> Wp-Content >> Themes
After that, choose the active template (i.e. the template you are working on), search for the functions.php file, and then click Edit in order for us to modify it and reset the password.
After opening the file, you have to add the following line to reset the password
You must change the password with the new password you want for the admin. As for the number (1), it is the user ID number, meaning the user ID in the users table, which is often (1).
After that, you have to save the file and log in to your WordPress control panel using the new password you set.
Note : After you log in, you have to go back to the functions.php file and delete the previous line that was added, because if you do not delete it, this code will reset your password every time you access your site.
2- Cache and cookies
Cookies are files that store information about a user’s interaction with websites. You can deactivate this option through your browser settings. The browser cache refers to the temporary files stored when you access a web page.
You can try deleting the cache and restarting the browser again. In general, if you see a message (cookies are blocked), the solution will be through the browser settings.
WordPress requires cookies to be activated during the login process (so you must activate them if they are not activated), through your browser settings.
Sometimes you need to delete profiles and storage to avoid login or other problems, through your browser settings
3- A blank page or php error message appears
Sometimes, when you try to access the WordPress control panel (Wp-admin), you see a blank page or a PHP error, due to one of the plugins or templates. There may sometimes be a conflict between add-ons or a problem in the process of updating an add-on or template
Solve the problem
The solution will be by deactivating the plugins and themes respectively to find out where the error is, through the FTP file transfer protocol and accessing the plugins file and then changing the name of the plugins folder so that WordPress does not read and recognize it. In this way we have deactivated the plugins, and the same thing. For templates.
Deactivate the template
You can deactivate templates from your hosting control panel with the following steps:
- Connection via FTP
- Go to path: Public_html >> Wp-Content >> Themes
- We select the Themes folder and change its name to another name
After you rename the active template, WordPress will not read it, and will activate the default template. Therefore, here you can try logging in to the WordPress control panel, and if you are able to log in, one of the templates you have will be the reason for this.
If the problem still exists, you will need to repeat the same previous steps, but we will deactivate the active add-ons as well.
Deactivate add-ons
You can also deactivate add-ons from your hosting control panel with the following steps:
- Connect to an FTP client
- Go to path: Public_html >> Wp-Content >> Plugins
- We select the plugin folder and then change its name to another name
Then, after deactivating the add-ons, we will try to log in to the control panel, and if you are able to log in, one of the add-ons you have will be the reason for this.
You can also do the same previous steps by connecting to your site management control panel (Cpanel), then going to File Manager, then following the same previous path to modify the file name.
4- Problems with the login file
Sometimes the wp-login.php file may cause some problems to the login process, as the file may be corrupted or accidentally changed, in which case you will not be able to access the login screen in the first place.
You must download the registration file again and replace it with the old file, through the following steps:
- Connect to your site via FTP
- Access the log file through the path: public_html >> wp-login.php
- After that, you should delete the file, but before deleting you should take a backup copy of the file.
- Then you have to download a new version of WordPress from the official website
- Then access the new registry file and copy the new file in place of the old file that was deleted.
Then you can update the login page for your site and try to log in again. If you are unable to log in, go to the next step:
5- Problems writing the site address
If there are problems writing the site address or WordPress address for any reason, this leads to many problems, including a login problem. For example, changing hosting, changing the domain of your site to a new domain , changing the location where you save WordPress files, or any other reason may lead to the site address being registered incorrectly.
You can find out these addresses from within the WordPress control panel, then go to Settings << General
You will find two basic fields that express the site address as follows:
- The WordPress address (URL) , is the address where your core WordPress files are located.
- The URL is the address that any user types in the browser in order to reach your site.
By default, these addresses will be the same, unless the site owner changes them. If these values change except to wrong values, you can solve the problem by modifying the wp-config.php file or the functions.php file as follows
Modifying the wp-config.php file
You will need to access the wp-config.php file via FTP:
Then open the file and add the following code:
The first option is WP_HOME, we replace http://example.com with the WordPress address (URL).
The second option is WP_SITEURL, we replace http://example.com with the site address (URL).
By default, the address will be the same for both. In this way, we have set the address names as fixed values, and therefore we cannot change them from the site’s general settings page.
Modifying the functions.php file
You will need to access the functions.php file of the template activated on the site and then add the following code:
You should use your own addresses instead of example.com, then update the site and try logging in again.
Note : After performing these steps and solving the problem, you will return again to the functions.php file and delete the code you added.
6- Problems due to file permissions
Less common are permission issues related to the wp-login.php file or the wp-admin folder, causing inability to access the login panel.
In general all WordPress files should be 644 and all folders should be 755.
To do this, you need to connect to your site via FTP, access the previous file and folder, change the permissions, and then try to connect again.
- The wp-login.php file should be set to 664.
- The wp-admin folder should be set to 775.
7- Problems due to permissions
There are some problems that may appear to you, due to user permissions, such that it is not possible to access add-ons or templates. This is possible due to a hack or due to a change in permissions, and thus the result is that you no longer have the ability or permission to access or enter the site.
Therefore, you will need to enter the database, add a new admin user manually, and then log in with the new user through the following steps:
First, you must connect to the hosting control panel (Cpanel ) and access the phpMyAdmin database
After entering, you have to access the database
Then choose the data leaders you are working on
After that, a window will open containing the tables in the database, where we will work on two tables (wp_users and wp_usermeta)
We will first add a new user to the users table (wp_users), by pressing (Enter)
A new window will open for us, where we must add the values and data for the user
- ID – Any identification number
- user_login – username.
- user_pass – password. MD5 must be specified as in the picture
- user_nicename – alias
- user_email – User email
- user_url – the url of your site
- user_registered – Specify the registration date and time for the new user
- user_status – set this to 0.
- display_name -The name that will be displayed on the site.
- After completion, we put on (Go)
- After that, you must edit the wp_usermeta file and enter some values
Data must be entered on the following shift:
- unmeta_id – generated automatically
- user_id – We put the user number that we created in the previous step
- meta_key – here we write wp_capabilities
- meta_value – we write {;”a:1:{s:13:”administrator”;s:1:”1
Then we scroll down and enter the following information:
- unmeta_id – generated automatically
- user_id – We put the user number that we created in the previous step
- meta_key – we write here
- meta_value – we write 10wp_user_level
- After completion, we put on (Go)
Now you should try logging in to your site’s control panel using the new username and password.
8- Other problems may cause the problem
There is also a problematic feature that may occur on your site, causing an inability to log in. Although it is not widespread, it is important to talk about it.
Access permission problems
If you see a Revoked Access message while you are trying to log in to the WordPress control panel, the reason for this is either that the client, for example, changed your membership on the site or deleted it, so you can no longer access the control panel and you no longer have access.
Problems due to .htaccess file
Sometimes the .htaccess file can cause a problem with logging in. To solve this, you need to rename it to a new name (for example: htaccess_temp) so that WordPress does not recognize it and try logging in and logging in, or you can recreate it again.
The problem of not being able to connect
If you try to access your site and you receive an error message, “Error Establishing Database Connection,” the problem will be the inability to communicate with data leaders, either due to damage to the database, a problem with the server, or something else. We previously talked about: Solving the problem of an error establishing a connection to the database
White screen of death problem
You may see a problem called (White Screen of Death) when you try to log in to your site, for several reasons, for example, due to memory consumption or problems due to add-ons or templates. We also talked about: ways to solve the screen of death problem. White
Problem due to firewall
Some firewalls (such as eTrust Personal Firewall) can prevent you from logging into WordPress. So you should check your firewall, disable it, and try logging in again.
In the end, there are many problems that may appear to you when you try to log in to WordPress, which may prevent you from accessing the site’s control panel. In this case, you need to use logical thinking methods to know what are the expected causes of the problem and how to overcome them
Leave a Reply