You track user logins with WP Last Login. Dates are wrong. User logged in yesterday shows last week. That is frustrating because you cannot see active users.
A common issue is that the plugin only updates on login via wp-login.php. If users log in via custom login page, social login, or REST API, plugin does not track. The plugin is not broken. Login method is not supported.
Why WP Last Login Shows Wrong Dates
WP Last Login hooks into wp_login action. This fires only on standard WordPress login. If users log in via custom page (Theme My Login), social login (Nextend), or REST API (mobile app), hook does not fire. Last login not updated.
This is not WP Last Login being bad. Alternative login methods need separate handling.
The Most Common Untracked Login Methods
- Custom login pages (Theme My Login, LoginPress)
- Social login (Facebook, Google, Twitter)
- REST API logins (mobile apps, headless WordPress)
- WooCommerce login from my account page
- Membership plugin login pages
Each needs custom code.
How to Fix WP Last Login Tracking
- Identify all login methods on your site
- Add custom code for each login method
- For WooCommerce, add this to functions.php:
add_action('woocommerce_login', 'update_last_login');
function update_last_login($user_login) {
$user = get_user_by('login', $user_login);
update_user_meta($user->ID, 'last_login', current_time('timestamp'));
}
For social login, check plugin’s hooks.
How to Track Logins via Any Method
Use Simple History plugin. It logs all logins regardless of method. Then display last login from Simple History data.
Simple History tracks everything.
Alternative: Use User Login Log Plugin
Install User Login Log. It tracks all login methods including social and REST API. More reliable than WP Last Login.
Specialized login logger works better.
People Also Ask About Last Login Tracking
Why does WP Last Login show wrong login dates?
Plugin only tracks wp-login.php. Custom login methods not tracked.
Should I stop using WP Last Login?
Switch to User Login Log or Simple History. They track all methods.
Is WP Last Login worse than Simple History for tracking?
Simple History tracks more login methods. More reliable.
Final Thoughts
If WP Last Login shows wrong dates, custom login methods are not tracked. Add code for each method or switch to Simple History. Login dates will be accurate.