One of the nice things about WordPress is that if you want to do something, there’s almost certainly a plugin that will do it for you. Although there’s almost certainly a plugin to show a user’s last login, it won’t take you more than a minute to do it yourself using the code shown below.
First, open the functions.php file in the theme you’re using. A child theme, we assume. Next, copy this first snippet of code into functions.php.
The code above is used to record login dates and times. Obviously, you now want to be able to see this information, so you have to tell WordPress where it should go.
We want to add this information to the ‘users’ section of your backend admin section, so go back to your functions.php and paste this code after the snippet you just added.
That’s actually all there is to it! To test, save your functions.php and go the ‘users’ page in your site backend. You should have a view more or less the same as shown below.