WordPress For Non-Techies: Free WordPress Tutorials – WPCompendium.org

WordPress Troubleshooting: Unable To Log Into WordPress Administration

This tutorial is part of our WordPress Management tutorial series. In this tutorial, we show you what to do if you are unable to log into your WordPress Administration area.

To view all of our WordPress troubleshooting tutorials, go here:

WordPress Troubleshooting: Unable To Log Into WordPress Administration Area

Sometimes errors can cause WordPress login problems, or make your WordPress dashboard unavailable, preventing you from accessing plugins, themes and other important information on your site.

In this section, you will learn what to do if you are unable to log in or regain access to your WordPress Administration area.

Troubleshooting Checklist

Have you established that the problem / issue is not related to:

If none of the above are possible reasons, try one of the solutions listed below.

Unable To Log Into WordPress Administration Area? Try These Methods

Can’t log into your WordPress Administration area? Try the methods below:

Method 1: Edit Users Table

For this tutorial, you will need to have access to a cPanel hosting account and phpMyAdmin.

Log into your cPanel administration area …

Click on phpMyAdmin in the ‘Databases’ section of your administration panel …

This takes you to the main ‘phpMyAdmin’ section …

Click on the MySQL database associated with your WordPress site …

Most default WordPress installations automatically assign the suffix “wrdp1” to the database.

Note: Several WordPress installations are shown above – make sure to choose the correct database for the site you are trying to log into. On multiple WordPress installations, suffixes “wrdp2”, “wrdp3”, etc are assigned. In the example above, the database name is “wptod1”, and we are going to use the “wrdp3” installation for this tutorial.

Click on the database name to load the MySQL data tables structure into the main window of your phpMyAdmin panel …

Click on the wp users table in the left menu (default is wp_users, or yourprefix_users if you defined a different table prefix), or ‘wp_users’ in the main window …

Make sure that you are in the ‘Browse’ section, and click on the ‘Edit’ link in the database row of the admin user …

Delete whatever is currently in the password field (‘user_pass’) …

Enter a new password …

Note: Make sure to enter a strong password into the ‘user_pass’ field.

To learn more about creating strong passwords, see the tutorial below:

From the ‘user_pass’ row’s Function drop-down list, choose MD5

Click ‘Go’ to save the new information in the database …

Your new password will be made secure in the database via the MD5 data encryption method …

Log into WordPress using your admin username and the new password you have just created …

Your WordPress admin access should now be restored …

Congratulations! Now you know how to regain access to your WordPress Administration area by editing your Database’s ‘WP Users’ table.

Method 2 – Edit ‘functions.php’ File

Use the method described below if you have changed the URL of your WordPress installation in the General Settings‘ section, and find yourself unable to log back in.

In order to complete this tutorial, you will need to edit a WordPress installation file called ‘functions.php’. We provide a step-by-step tutorial below that you can follow and a downloadable template. If you don’t feel comfortable editing files, however, then seek help from professionals.

Changed General Settings URL And Can’t Log Back In

On single WordPress installations, the Settings > General screen contains two fields where URLs are entered:

The above fields are important settings, as they control where WordPress thinks your site is located. These settings control the display of the URL in the admin section of your page as well as the front end, and are used throughout the WordPress code.

Note: Both settings should include the http:// part and should not have a slash “/” at the end.

There may be instances where the URLs in these fields may need to get changed for some reason, or get accidentally changed (i.e. mistakes, typos, etc.), and you discover that your site no longer works properly, or it is being redirected to another URL, leaving you unable to log into your WordPress admin area.

If you have changed the URL values incorrectly, and you have access to the site via FTP, then follow the method below to quickly get your site back up and running:

Edit functions.php

Open your FTP application and connect to your site, then open the ‘public_html’ folder …

Locate the ‘functions.php’ file inside your active theme folder …

Transfer a copy of the file to your hard drive. We recommend making two copies: one for editing (see below), and one to keep as an original backup in case something goes wrong and you need to reinstall the original file …

You will need to edit the ‘functions.php’ file to make the necessary changes that will give you access again to your WordPress Admin area.

Open the ‘functions.php’ file using a simple text editor (e.g. notepad) …

Note: to view a .php file in notepad, make sure to select ‘All Files’ from the file type drop-down menu, not the default (i.e. ‘Text Files (.txt)’) …

Add these two lines to the file, immediately after the initial “<?php” line …

Make sure to replace “yoursite.com” with your own site’s URL.

Note: If your site is installed in a sub-directory (e.g. ‘http://yoursite.com/blog’), then make sure to use the correct URL.

Your file should look like the example shown below …

Save the file and re-upload it back to your site, replacing the original ‘functions.php’ file in the same location.

Visit your login page. You may need to try a couple of times before the site comes back up.

Log into WordPress using your admin username and password …

Your WordPress Admin access should now be restored …

Once your site has been restored and is up and running again, repeat the above steps, then open the ‘functions.php’ file, remove the two lines you previously added, resave the file and re-upload it to your site without those lines.

Method 3: If No ‘functions.php’ File Exists

If there is no ‘functions.php’ file in your WordPress theme, follow the steps below to create one, or just download the template ‘functions.php’ file provided below.

If your theme does not have a ‘functions.php’ file, download the sample functions.php file below, then edit it as shown in the tutorial above and upload it to your server. Download file is in .zip format:

How To Create A functions.php file

Create a new blank text file using notepad …

Add the code below to the file, replacing “yoursite.com” with the URL of your site …

Save the file as ‘functions.php’ (remember to choose ‘Save as type: All Files’ before saving) …

Upload the new file to your theme directory (‘/public_html/wp-content/themes/themename‘), then visit your login page and try to login.

If login is successful, return to your FTP screen and delete the ‘functions.php’ file from your themes folder, as this file did not previously exist for that theme …

Congratulations! Now you know how to regain access to your WordPress Administration area by editing your theme’s ‘functions.php’ file.

If Editing The functions.php File Doesn’t Work

If editing your functions.php file does not work, then refer to the ‘How To Manually Override Your WordPress Login Details’ section in the tutorial below:

If You Still Cannot Log Into Your WordPress Administration

The WordPress Codex provides a list of possible reasons why you may have been locked out of your WP Admin area with solutions that will require you to edit some of your installation files.

This includes the following:

If you suspect that any of the above reasons may be the cause of your difficulties logging into WordPress, then visit the WordPress help page below for possible solutions:

Additionally, check the ‘Tutorials’ section below or see the additional resources links in this tutorial:

Next Section:

Now that you know about different methods to regain access to your WordPress admin area, click on the link below to view the next section of our WordPress Troubleshooting Guide.

To learn what to do if you are experiencing WordPress errors related to plugins, see the tutorial below:

(Source: Pixabay)

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)

***

Recommended Video Courses For WordPress Users

How To Set Up WordPress On Localhost

Learn how to install, set up, and locally host a fully functioning WordPress site on your computer.

More info: How To Set Up WordPress On Localhost

Recommended Video Courses For WordPress Users

Using Password Managers

Password Managers provide an easy and secure way to keep track of all your passwords. This video course shows you how to use two FREE powerful password management tools.

More info: Using Password Managers

Recommended Video Courses For WordPress Users

How To Use FTP

This video course shows you how to use FTP (File Transfer Protocol) to transfer and upload files between your hard drive and your server using a free FTP program called Filezilla.

More info: How To Use FTP

Recommended Video Courses For WordPress Users

Google Tools

This video course will help you learn the basics of using Google Tools like Google Analytics and Gmail.

More info: Google Tools

Recommended Video Courses For WordPress Users

WordPress Security

Learn how to keep your WordPress site or blog secure and protected from malware, hackers and brute-force attacks.

More info: WordPress Security

Recommended Video Courses For WordPress Users

How To Use Amazon S3

Learn how to set up and use Amazon S3 to upload, store, manage, and protect your site’s images, large media files, downloadable files, stream videos and more.

More info: How To Use Amazon S3

Recommended Video Courses For WordPress Users

How To Back Up & Restore WordPress Sites

Learn how to safely and automatically backup your WordPress files and database and how to easily restore your WordPress site if something were to happen.

More info: How To Back Up & Restore WordPress Sites

Recommended Video Courses For WordPress Users

How To Use cPanel

cPanel is a powerful and simple-to-use web hosting management software application that gives website owners the ability to quickly and easily manage their servers and websites using a simple and intuitive dashboard.

This video course will teach you how to use the main features of cPanel to manage your web hosting.

More info: How To Use cPanel

Recommended Video Courses For WordPress Users

How To Optimize WordPress

Learn how to optimize your WordPress site and improve your page loading speed.

More info: How To Optimize WordPress

Recommended Video Courses For WordPress Users

How To Set Up A Forum On WordPress

Learn how to set up a forum for your visitors, prospects, customers, members, or affiliates using WordPress.

More info: How To Set Up A Forum On WordPress