{"id":57361,"date":"2020-09-22T15:17:37","date_gmt":"2020-09-22T20:17:37","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=57361"},"modified":"2020-09-22T15:17:37","modified_gmt":"2020-09-22T20:17:37","slug":"fixing-wordpress-login-errors-with-cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/tips-and-tricks\/fixing-wordpress-login-errors-with-cpanel\/","title":{"rendered":"Fixing WordPress Login Errors With cPanel"},"content":{"rendered":"\n
\u201cHelp, I can\u2019t log in to WordPress!\u201d is one of the most common WordPress hosting support requests. Being locked out of WordPress is worrying, to say the least, but there\u2019s no need to panic because you\u2019re in the right place.<\/p>\n\n\n\n
There are several reasons you might end up locked out of WordPress, and they are straightforward to resolve with cPanel & WHM. In this article, we look at four of the most common login problems and show you how to fix them. They are:<\/p>\n\n\n\n
You\u2019ve lost your WordPress password, and that means you can\u2019t log in. In most cases, the built-in password reset tool is all you need. However, if you can\u2019t access the email account that WordPress sends the reset link to, you\u2019ll have to roll up your sleeves and edit the MySQL database. <\/p>\n\n\n\n
Fortunately, that\u2019s easy to do in cPanel. First, fire up phpMyAdmin<\/em>, which you\u2019ll find in the Databases <\/em>section of the cPanel main page. <\/p>\n\n\n\n In the sidebar on the left, find the database for your site. It should look like yourusername_wp, <\/em>but it may be different depending on your site\u2019s configuration. <\/p>\n\n\n\n Click on the plus sign (+), and you\u2019ll see a list of tables. <\/p>\n\n\n\n Click on the wp_users <\/em>table, which is where usernames and passwords are stored. <\/p>\n\n\n\n Find your username in the user_login <\/em>column, and click Edit<\/em> at the beginning of that row. The hashed password is in the column next to your user\u2019s login name, but don\u2019t try to change it on this screen. <\/p>\n\n\n\n On the next screen, find the user_pass <\/em>row and type a new password in the value column. In the function column, select MD5 from the dropdown menu. WordPress doesn\u2019t store plaintext passwords. It runs the password through a hashing algorithm<\/a> and stores the hash value. We have to replicate that by selecting the MD5 function. <\/p>\n\n\n\n Finally, click Go<\/em>, and PHPMyAdmin will write the password hash to the database. You can now log in to your site with the new password. <\/p>\n\n\n\n Giving your user a new password is easy in cPanel, but what if the login interface doesn\u2019t load at all? If you\u2019re faced with a blank screen, you\u2019re dealing with the White Screen of Death. <\/p>\n\n\n\n There are several possible causes, but the most likely is poorly written or conflicting plugins, so the first step is to disable all plugins.<\/p>\n\n\n\n The strategy is to rename the folder that contains the plugin files. WordPress won\u2019t be able to find the plugins, so they won\u2019t be loaded.Open the cPanel File Manager <\/em>from the Files<\/em> section of the main page.<\/p>\n\n\n\n Navigate to your site\u2019s directory, which is probably in the root or a subdirectory of public_html<\/em>. <\/p>\n\n\n\n Navigate into the wp-content<\/em> directory and click on the plugins<\/em> folder. <\/p>\n\n\n\n Select Rename<\/em> from the toolbar. Choose a name like \u201cquarantined_plugins.\u201d <\/p>\n\n\n\n Now try to log in. If you\u2019re successful, rename the directory back to \u201cplugins.\u201d If WordPress continues to work, disable all the plugins in the WordPress interface and re-enable them one-by-one until the login error re-occurs. At this point, you have discovered the culprit.<\/p>\n\n\n\n If this method doesn\u2019t work, you may want to consider restoring your site from a backup taken before the incident. <\/p>\n\n\n\n Lost admin privileges are another common problem. You can log in to your site, but you don\u2019t have access to features that require administrator privileges. This can happen if another admin user removes your access. It is also a common malware tactic, so you should run a malware scanner<\/a> as soon as you regain access. <\/p>\n\n\n\n To regain your privileges, we\u2019re going to create a new user account with the correct permissions. You can follow the same steps whenever you need to create a user from outside WordPress\u2019s interface. It is possible to add privileges to an existing user, but this method is less complicated. <\/p>\n\n\n\n First, navigate to your database in phpMyAdmin, following the steps described in Fixing a Lost or Forgotten WordPress Password <\/em>above. Find the wp_users <\/em>table and click Insert<\/em>.<\/p>\n\n\n\n Add the following information to the form\u2019s Value<\/em> field:<\/p>\n\n\n\n When you\u2019re done, the form should look something like this:<\/p>\n\n\n\n Take note of the ID, user_login, and user_pass values, because you\u2019ll need them in the next step and to log in. <\/p>\n\n\n\n Click Go. <\/em>Click Go <\/em>again to confirm, <\/em>and the new user is added to the database. <\/p>\n\n\n\n Next, we need to give the new user admin privileges. Go back to the main page for your database and click Insert <\/em>next to the wp_usermeta<\/em> table.<\/p>\n\n\n\n We need to add the admin privilege information to this database field and associate it with the new WordPress user via the user_id<\/em> value. <\/p>\n\n\n\n As before, click Go <\/em>on this page and the next page. That\u2019s it! You can now use the details you added to the database to log in with admin privileges. Don\u2019t forget to investigate why your account lost admin privileges in the first place. <\/p>\n\n\n\n Our final login blocker occurs because of database corruption, user error, or a compromised site. If you see \u201cError Establishing Database Connection\u201d when you try to log in, it means WordPress is having a hard time talking to its database. <\/p>\n\n\n\n Several problems can cause this error, which is why we wrote an article that explains how to fix it. Take a look at How To Fix \u201cError Establishing a Database Connection\u201d in WordPress<\/a> to learn more. <\/p>\n\n\n\n Hosting clients often panic when they are locked out of WordPress, and that\u2019s perfectly understandable: it\u2019s hard to fix a problem when you can\u2019t access the admin interface. However, with cPanel & WHM\u2019s built-in tools, hosting clients and hosting providers can quickly and easily diagnose and resolve the most common log-in errors. <\/p>\n\n\n\n As always, if you have any feedback or comments, please let us know. We are here to help in the best ways we can. You\u2019ll find us on Discord<\/a>, the cPanel forums<\/a>, and Reddit<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" \u201cHelp, I can\u2019t log in to WordPress!\u201d is one of the most common WordPress hosting support requests. Being locked out of WordPress is worrying, to say the least, but there\u2019s no need to panic because you\u2019re in the right place. There are several reasons you might end up locked out of WordPress, and they are […]<\/p>\n","protected":false},"author":77,"featured_media":65517,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[61],"tags":[],"class_list":["post-57361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-and-tricks"],"acf":[],"yoast_head":"\n<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Fixing The WordPress White Screen of Death in cPanel<\/strong><\/h2>\n\n\n\n
How to Disable WordPress Plugins without Logging In<\/strong><\/h2>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Fixing Lost Administrator Privileges on WordPress<\/strong><\/h2>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Fixing WordPress \u201cError Establishing a Database Connection\u201d in cPanel<\/strong><\/h2>\n\n\n\n