What if I’m unable to log into WordPress?
Have you been locked out of WordPress? Here’s a Quick and Simple Solution!
Are you having trouble logging into your WordPress site? Are you unable to reclaim access to your website? We can only imagine the terror and frustration that would accompany this situation.
While there are various possible explanations, one of the most common is a hack. If a hacker has taken control of your website, you must act immediately to regain it. To ascertain whether it is a hack or not, you must immediately scan your website.
A hacked website can have a negative impact on your business and reputation. After gaining access to your website, hackers use it to commit a range of unethical acts, such as stealing personal information, deceiving visitors, showing malicious adverts, and selling narcotics.
You run the danger of getting banned by Google and your web server suspending your website. Your revenue diminishes, and as a result, your business suffers.
There are numerous methods for regaining access to your WordPress Site, depending on how you were locked out in the first place. We’ll go over the numerous reasons you can be locked out and present solutions for each.
Reasons Why You’re Locked Out Of WordPress And How To Fix It
You could have been locked out of your WordPress website for a variety of reasons. The key to quickly resolving the issue is to first identify the problem. And you can do so by recognizing the symptoms. Nothing can put a halt to your working like being unable to access your WordPress dashboard. You can’t make or publish content, respond to comments, or do anything else on your website if you don’t have that capacity.
Unfortunately, there are numerous reasons why you may be locked out of your site. The good news is that because WordPress is so adaptable, there are numerous ways to identify and resolve this issue. Furthermore, even for beginners, most of them are pretty simple. You should be able to troubleshoot and resolve the problem quickly. In this article, we’ll look at some of the most common reasons why you can get locked out of your WordPress dashboard. Then we’ll go over seven different approaches you can use to solve the problem.
Common Reasons for Getting Locked Out of WordPress
The problem of getting locked out of WordPress can manifest itself in a variety of ways. Although the specific page and message you see when attempting to log in may differ, the end effect is the same: You are unable to access your WordPress administration area. In this section, we’ll go over some of the possible presentations you might see, as well as an explanation of why you might be experiencing that specific issue.
We’ll also add a link to the solution for each, so you can skip down to the correct repair. It’s worth noting that, while each of these issues appears to be the same on the surface (that is, you can’t log in), the remedies can be quite different. There isn’t always a one-size-fits-all solution. As a result, we advise you to match up the precise problem you’re encountering. With that out of the way, here are some of the probable issues you may encounter if you are unable to enter into your dashboard:
- “This has been disabled,” you observe. The most likely reason for this issue is that you are using the incorrect login URL for your site. You must restore the login URL for your WordPress site.
- Your WordPress password isn’t working, and password recovery isn’t working. Sometimes an issue with your site’s email system prevents the recovery email from being sent. To resolve the issue, use phpMyAdmin to reset your password.
- You no longer have administrator privileges. In this case, your login is valid, but you are unable to do any administrative duties. As a result, the next step is to create a new administrator user.
- You’ve been locked out because you’ve made too many login attempts. This is done by some security plugins to prevent unwanted access. You must disable your security plugin.
- There is a blank white screen (sometimes known as the “White Screen of Death”). There are various causes for this, however the most common is a plugin issue. It can also be caused by PHP memory difficulties. You’ll need to investigate the White Screen of Death.
- An “Error establishing a database connection” warning appears. This message indicates an issue with WordPress’s MySQL database, which is utilised for data storage. You must fix the database connection error.
- A “Parse error: syntax error” warning is displayed. This problem is mainly caused by wrongly typed code. Any recent code modifications must be undone as a solution.
Let’s take a look:
1) A Hacked Website
Are you unable to access your WordPress admin but can still access your website? There is a risk that hackers gained access to your website and made themselves admins, robbing you of your admin rights. You are locked out, but they continue to operate your website. Look for obvious evidence that your site has been hacked if you suspect it has been hacked. Among them are the following:
- Your site’s content has changed, so you should check to see what’s new.
- There’s a lot of spam on your site.
- Your site is ranked for illegal drugs or fake goods.
- Your site takes you to another site.
How To Fix A Hacked WordPress Website?
Because you can’t get into your website, you have very few options: 1. If you are a customer of BlogVault, you can see your own dashboard. If you click on “Security,” you can run a scan of your site. Once it finds the hack, you can clean it right away by clicking on “auto-clean.” Getting your site hacked won’t take long at all. There are people who work for BlogVault who are available to help you 24 hours a day. Then, if you don’t have any kind of separate dashboard like BlogVault, you can try different things.
- Get in touch with your WordPress host. They may be able to help you get back in from their side.
- Ask for help from a professional. In order to get your site back to normal, contact the BlogVault team. They will do this manually and give you back your rights.
- After you fix your website, we recommend taking safety steps like always having a security plugin running and making your site more secure.
2) Error Establishing Database Connection
When a visitor arrives at your website, it queries the database for material to display. It retrieves this content and generates the page we see on our displays. If you try to access your site and encounter an error like this:
This signifies that your WordPress site cannot connect to your database. As a result, it is unable to retrieve the content required to display your website. This can happen for a variety of reasons, including:
- Your database has been corrupted or damaged.
- Your host’s web server is having a problem.
- Your wp-config file (where your database information is stored) is incorrect.
- Your website is seeing a surge in traffic, causing your server to become overburdened.
How To Fix ‘Error Establishing Database Connection’?
We recommend that you first contact your web hosting company. Typically, they will be able to address the issue for you within a few minutes of receiving notification from your host. If they are unable to do so, you will need to take other steps, such as restoring your WordPress database.
3) White Screen Of Death
Is your screen blank and white, with no error message? This is referred to as a white screen of death. Because there is no error message, it frequently generates fear among WordPress users. It’s far more difficult to figure out what’s wrong. You could be experiencing a white screen of death for one of the following reasons:
- Your website’s memory limit has been reached.
- You’ve put a shoddy-coded theme or plugin on your website.
- There is a problem with your web host.
How To Fix The White Screen Of Death?
1. Clear your Cache
We recommend that you delete your WordPress cache. Sometimes a problem will resolve itself on its own. If you have a caching plugin enabled, however, you will continue to see the white screen of death.
2. Check your Email
Check your WordPress admin email’s inbox next. In most circumstances, your web host will send you an email outlining the issue with your website. They send you a URL that allows you to access WordPress in recovery mode. This will allow you to gain temporary access to your site in order to resolve the issue, such as uninstalling the defective plugin.
3. Deactivate Plugins/Themes using FTP
If you do not receive an email, you can access your website using FTP. We recommend that you download and install Filezilla on your PC. You must provide your FTP credentials here.
You can disable all of your plugins once you’ve established a connection with your site. Navigate to public html > plugins.
Rename the folder ‘plugins’ to ‘plugins-deactivated.’ This will turn off all plugins on your WordPress site. Try browsing your WordPress website now. If your site is operational, you can enable your WordPress plugins one at a time to identify the broken one. Deactivate your themes folder in the same way. When you recover access, test your theme to see whether it was the source of the issue.
4. Increase your Memory Limit
Finally, you have the option of increasing your RAM limit. To do so, navigate to your wp-config file. FTP into your website and navigate to public html > wp-config.php.
Download and edit this file with any text editor of your choice. Just before the line ‘That’s all, quit editing!’ ‘Have fun blogging.’ define (‘WP MEMORY LIMIT’, ‘256M’); This code instructs WordPress to raise the PHP memory limit to 256MB. After that, use the same FTP to save and upload the file back to your website. Your website should be up and running again shortly.
4) Incorrect Password
You may be locked out because you used the incorrect username and password combination. This can happen if you have your website set to allow only a certain number of login attempts. If you enable the BlogVault plugin on your site, for example, it will immediately implement limited logins. This means that if a user enters the erroneous username or password more than three times, they will be locked out of their account.
How To Fix Incorrect Password
To recover access, select the ‘Lost password’ option and create a new WordPress password. A link will be emailed to your registered email address allowing you to reset your password. If you’re positive you’re typing the correct credentials for your account but it’s prompting you that they’re incorrect, your site has most likely been hacked.
5) Lost Admin Privileges
You may be able to connect to your WordPress website in some situations, but you will not see admin functions. This signifies you’ve lost your admin user privileges. For instance, you can only see articles and pages, but not themes, plugins, or other functions. Again, this could be an indication of a hacked site. Hackers infect your website and grab control of it.
How To Fix ‘Lost Admin Privileges’ Issue
We propose that you utilise our professional malware removal services to resolve this. Contact BlogVault immediately to have your site restored to normal. If you are technically skilled and familiar with cPanel, you may also try adding yourself as an administrator user via phpMyAdmin. This procedure is risky, and even a minor error might result in the complete destruction of your site. This is not a recommended method.
Before performing this, please create a complete backup of your WordPress website. Refer to our article on How to Protect Your WordPress Site from Hackers. We will demonstrate how to add a new user to your database in this section. [ss click to tweet tweet=”” content=”If you’re unable to log into your WordPress blog, this BlogVault guide is for you! Consider the reasons you may have been locked out of your site and how to recover access. ” style=”standard”]
3. Create a New User With Administrator Privileges
With this particular issue, you can log in but lack the normal administrator capabilities. This may imply that you are unable to conduct crucial operations required to maintain your site operational. This is frequently the consequence of nefarious action – either your site was hacked or someone with access to your account made changes.
Security and recovering from a hack are separate topics, and we will not discuss them here. However, we will demonstrate how to reclaim your administrator privileges. Navigate to the phpMyAdmin interface and select your website from the left-hand menu (see the previous step for exactly where to find this). Scroll down the list until you see the wp users table.
Select the Insert option from the drop-down menu. After that, complete the form. In WordPress, each field correlates to a field in the user settings. For example:
- ID: Choose a number that isn’t already taken by one of the other users on your site. For example, if you have five users, your new user should be at least number six.
- user_login: The username for your new administrator account.
- user_pass: The password for the new user.
- user_nicename: A nickname for the user.
- user_email: The email address for the account.
- user_url: Your website’s URL.
- user_registered: The current date.
- user_status: Should be zero.
- display_name: The name you want to be displayed on your website for this user.
When you’re ready, you can click on Save to save this new user to your computer. After that, you must grant this new user administrative privileges. Scroll down until you reach the wp usermeta entry and press the Insert button. Fill in the blanks with the information listed below:
- unmeta_id: Leave this blank.
- user_id: The ID number of the new user (from above).
- meta_key: Enter “wp_capabilities”.
- meta_value: Type in “a:1:{s:13:”administrator”;b:1;}”.
When you’re done, click on Go. Now repeat the above process, but with the following values:
- unmeta_id: Leave this blank.
- user_id: The ID number of the new user (from above).
- meta_key: Type in “wp_user_level”.
- meta_value: Set this to “10”.
You have the option to select Go once more. You have now successfully assigned administrator privileges to the new user. You can log in with this user and have full access to your website as well as the WordPress administration area. If you are not familiar with phpMyAdmin, or if you simply prefer the command line, you can create your new user by using the WP-CLI command line interface.
You can create a new account with administrator privileges by connecting to your site over SSH, navigating to the WordPress directory, and entering the following code: Create a new WordPress user using the email address admin@example.com. In this case, “admin@example.com” should be replaced with the login and domain of your site that you want to use.
Troubleshoot the White Screen of Death (WSoD)
The phrase “White Screen of Death” is used in the WordPress community to represent a blank white screen that you may get when attempting to visit your site. A WSoD can be caused by a number of factors. In most cases, it’s due to a malicious plugin or a lack of PHP memory on your site. We’ll go over each scenario and troubleshoot it.
Disable All WordPress Plugins
You should first check to see if a plugin is to blame. There are a lot of plugins that you’ll need to turn off in order to do this. You can then turn the plugins back on one at a time until you can figure out which is the one that is making your site not work. When you don’t have access to your WordPress dashboard, you’ll need to use SFTP to get rid of all of your plugins. Again, you can follow the steps in Step 1. When you rename a folder for a specific plugin, you’ll want to rename the whole plugins folder, not just the folder for that plugin.
This stops them all. Reload your page and see if it works. If not, move on to the next step. Make sure you don’t log out of the WordPress dashboard while you do this. If disabling all plugins doesn’t work, open up your site in SFTP again and change the plugins folder back to its original name. If you go to Plugins > Installed Plugins in the dashboard, you should see them there now. Next, disable the plugins from the dashboard by selecting all of them and choosing Deactivate from the Bulk Actions menu, then click OK to save your changes.
As long as the list isn’t too long, you can go back and turn on each plug-in as you go. Reload your site after each one to see if the WSoD comes back. If it does, you’ll be able to figure out which plugin did it. Here, you can look for updates that might help, or look for a different way to do things.
Increase Memory for Your Site
In this case, the next thing you should do is try increasing the amount of memory your website has. SFTP your site again and look for the wp-config.php file at the root of the site.
You’ll have to change that file. In the DreamHost file manager, you can click on the arrow next to the site name and then choose Edit. Then, add the following code to the file: WP MEMORY LIMIT should be set to 64M. The way it looks when it’s being used:
Click Save, then reload your site to see whether the error has been repaired. If it doesn’t work, you can attempt a few more troubleshooting steps in our post on how to fix the White Screen of Death. If all else fails, get in touch with your host’s support.
6. Resolve Database Connection Errors
When you try to log in and notice “Error establishing database connection,” it means WordPress is unable to connect to the MySQL database.
These databases are used by WordPress sites to store practically all of the information on your site. If a connection is not established, your website will not be able to load. The good news is that the underlying reasons of this problem are rather simple to address. However, because there are several possibilities, determining which one applies can be time-consuming.
In this section, we’ll go over how to fix the most typical scenario: a mismatch in login credentials. The MySQL database has its own set of login data that is distinct from the data utilised by your WordPress site. Troubleshooting entails ensuring that WordPress has the necessary database credentials. The first step is to track out those credentials. Open the wp-config.php file on your site with SFTP.
Make a note of the database’s name, username, and password. You may now go to your DreamHost Control Panel and select More > MySQL Databases. Scroll down until you discover the hostname that corresponds to the domain name of your site. Check that the database name matches the one in the wp-config.php file. If it doesn’t, you can change the database name in wp-config.php.
Next, check the Users Access column to ensure that the username matches the one in the wp-config.php file. You can find the password by clicking on this name. If there is a discrepancy, change your wp-config.php file. You can now check to see if you can access your login page.
7. Undo Recent Code Changes
If you load your site and receive a “Parse error: syntax error” warning, this indicates that some code on your site has been entered incorrectly, preventing WordPress from loading. This is most frequently the result of code being copied and pasted from the internet without being double-checked. Although more recent WordPress versions should prevent this from occurring automatically, if your site is running an older version, you may still encounter this error. It’s easy to fix – simply undo the last update you made to your site’s code prior to this problem appearing.
Alternatively, you can restore a functioning backup from a recent date. If you still wish to utilise the code, you can consult our comprehensive guide on resolving WordPress syntax problems. To avoid this issue in the future, we recommend validating any code you download from an online source. You may rapidly examine any HTML or CSS for flaws using a tool such as the W3C Markup Validation Service. Additionally, it’s prudent to build a new backup before making any code changes in case something goes wrong.
When You See the “Parse Error: Syntax Error”
The best feature of WordPress is the ease with which you may add functions to enhance the functionality of your site. Numerous code snippets are available online that you can copy and paste into your WordPress code to add that additional bell or whistle. If you are now encountering the “parse error: syntax error” when attempting to visit your site, the likelihood is that you recently copied and pasted one of these pieces of code from the internet into your WordPress files.
Error in syntax It is possible that the code you copied contains errors or that you did not put it correctly. They should be able to turn back any of these types of errors as of WordPress 4.9, making it more difficult for this to happen.
Check for Any Recent Code Changes
Typically, the parse error message informs which file caused the error. The likelihood is that it is the functions.php file. To undo any modifications and get your site back online, you must first open the file for editing. To begin, connect to your site’s files via FTP or SFTP. When connected, locate and double-click the folder containing your WordPress files.
If you examine the syntax error you received, you’ll notice that the file’s path is supplied. Simply follow this path to the file that requires editing. Once located, right-click on it and choose View/Edit from the context menu. Following that, locate and delete the changes you made to this file (take care to remove only the code you added and nothing else). Now save and re-upload the file to your server, at which point you can reload your site. If you deleted the code carefully, your site should now function normally and you should have access to your dashboard. If you still desire the additional functionalities for which the code was added, there are a few options.
- Ascertain that you copied and pasted the “whole code.” There have been situations where portions of the code were not copied correctly, resulting in the error.
- Verify that you pasted the code properly. If an instruction states to “paste it at the bottom,” this does not mean beneath the ending php tag (?>). Rather than that, you must paste it prior to this tag.
- The code may contain an error; in this case, contact the website from whom you obtained the code.
- Locate a plugin that performs the required function.
5. Incorrect WordPress URL
Changing the domain name of your website may potentially result in you being locked out of WordPress. If you recently made such a modification, verify that the URL of your site matches the one saved in the MySQL database. How to Correct This? MySQL is the database used by WordPress to store all of its data, including site URLs. Therefore, if you wish to update your database’s URL, utilise phpMyAdmin to make the necessary modifications and resolve the issue.
Final Thoughts – unable to log into WordPress
Being locked out of your website can be a source of anxiety and frustration. We hope this tutorial has assisted you in resolving the issue and restoring normalcy to your website. According to our experience, the most typical reason for being locked out of WordPress is a hack. It is critical that you immediately implement security measures on your website. To begin, always make a backup of your WordPress site.
In the event that something goes wrong, you can swiftly restore normalcy to your website. We strongly recommend using BlogVault since it creates a comprehensive backup of your WordPress website that is guaranteed to operate when you need to restore it. Additionally, its self-contained dashboard enables you to access your site even if you are locked out. Additionally, the plugin will scan and monitor your site for hacking attempts and unusual activities. You can relax in the knowledge that your site is secure.