Title: WP Last Login
Author: Konstantin Obenland
Published: <strong>2012 年 1 月 22 日</strong>
Last modified: 2026 年 10 月 9 日

---

搜索插件

![](https://ps.w.org/wp-last-login/assets/banner-772x250.png?rev=3527809)

![](https://ps.w.org/wp-last-login/assets/icon.svg?rev=3527809)

# WP Last Login

 作者：[Konstantin Obenland](https://profiles.wordpress.org/obenland/)

[下载](https://downloads.wordpress.org/plugin/wp-last-login.9.zip)

[实时预览](https://cn.wordpress.org/plugins/wp-last-login/?preview=1)

 * [详情](https://cn.wordpress.org/plugins/wp-last-login/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-last-login/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-last-login/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-last-login/#developers)

 [支持](https://wordpress.org/support/plugin/wp-last-login/)

## 描述

**WP Last Login** records when each user signs in and surfaces it as a sortable 
column on the Users screen — so you can see who’s active, identify dormant accounts,
and confirm that real people are coming back.

### Features

 * Sortable “Last Login” column on the Users screen, including the network admin
   user list on multisite.
 * Hover any date to reveal the exact login time.
 * Captures logins via the standard `wp_login` action, so it works with any login
   flow that triggers it — including the [Two Factor](https://wordpress.org/plugins/two-factor/)
   plugin, WooCommerce, BuddyBoss, and most social-login plugins.
 * Users without a recorded login show a neutral em-dash (—) — never a misleading“
   never” — and still sort correctly when ordered by last login.
 * Lightweight: one user meta key, no settings page, no extra database tables.
 * Filter hooks let you customize the date format, the placeholder shown for users
   without a recorded login, or hide the column from non-admin roles.

### Plugin Filter Hooks

**wpll_current_user_can** (_boolean_)

> Whether the column is supposed to be shown.
>  Default: true

**wpll_date_format** (_string_)

> The date format string for the date output.

**wpll_no_login_output** (_string_, _int_)

> The markup displayed for users without a recorded login, and the user’s ID.
>  Default:
> an em-dash with an explanatory tooltip

## 屏幕截图

[⌊Last login column in the user table.⌉⌊Last login column in the user table.⌉[

Last login column in the user table.

## 安装

 1. Download WP Last Login.
 2. Unzip the folder into the `/wp-content/plugins/` directory.
 3. Activate the plugin through the ‘Plugins’ menu in WordPress.

## 常见问题

### Why does the column show an em-dash (—) for all my users?

The plugin records a login when a user signs in _after_ it’s been activated. WordPress
doesn’t store historical login data, so existing accounts will start populating 
their “Last Login” the next time each user logs in. Hovering the dash shows a tooltip
explaining the same.

### How do I change the date format or show the time?

The date follows your site’s general date format (Settings  General); the exact 
time appears on hover. To override the date format, use the `wpll_date_format` filter:

    ```
    add_filter( 'wpll_date_format', function() {
        return 'Y-m-d H:i';
    } );
    ```

### How do I change what’s shown for users without a recorded login?

Filter `wpll_no_login_output`. It receives the default placeholder markup and the
user ID, and whatever you return is printed as-is, so escape any custom output:

    ```
    add_filter( 'wpll_no_login_output', function( $output, $user_id ) {
        return esc_html__( '(No logins since October 9, 2026)', 'my-textdomain' );
    }, 10, 2 );
    ```

### How do I hide the column from non-admin users?

Filter `wpll_current_user_can` and return a capability check. Login tracking still
happens — only column visibility is gated:

    ```
    add_filter( 'wpll_current_user_can', function() {
        return current_user_can( 'manage_options' );
    } );
    ```

### Does it work with multisite, Two Factor, WooCommerce, BuddyBoss, or social login plugins?

Yes. The plugin hooks into WordPress’s standard `wp_login` action, so any login 
method that triggers it is captured. The Two Factor plugin (which interrupts `wp_login`)
is supported via a dedicated hook.

### What happens to my data if I deactivate the plugin?

Deactivating leaves stored login timestamps intact, so reactivating preserves history.
Uninstalling (deleting the plugin entirely) removes all of the plugin’s user meta.

## 评价

![](https://secure.gravatar.com/avatar/86c46ccacac2166f2bfb52a3f2b8a1f61731fa4a4d54c4788a38ad508e890741?
s=60&d=retro&r=g)

### 󠀁[Does exactly what it needs to (and no more)!](https://wordpress.org/support/topic/does-exactly-what-it-needs-to-and-no-more/)󠁿

 [Jason LeMahieu (MadtownLems)](https://profiles.wordpress.org/madtownlems/) 2026
年 10 月 9 日 1 回复

A rare gem of a plugin that does exactly what it needs to, perfectly, and no bloat.
As a bonus, it includes amazing support: 18 minutes from a feature request to implementation!
😮I'm so impressed by both of those things that I'm off to see what other plugins
this developer maintains…. A+ plugin.

![](https://secure.gravatar.com/avatar/ecc227769daefb7a818965d0dae0efb2811d4a5535ca6a00ebea98820290c685?
s=60&d=retro&r=g)

### 󠀁[Very useful](https://wordpress.org/support/topic/very-useful-3700/)󠁿

 [Joris Le Blansch](https://profiles.wordpress.org/apiosys/) 2026 年 1 月 1 日

Simple, yet very useful plugin. Using it on dozens of sites I manage.

![](https://secure.gravatar.com/avatar/f75b51b22acc316a13f39c230d06c42127d4f0fcf83a6ff17de6b08592ba23a9?
s=60&d=retro&r=g)

### 󠀁[as perfect as simple](https://wordpress.org/support/topic/as-perfect-as-simple/)󠁿

 [amiens80](https://profiles.wordpress.org/amiens80/) 2024 年 10 月 4 日

this is the kind of plugin i love : just install, activated, no need setting, it
runs fine! no need support. As an english person, i have no need to translate it
at all. Great one ! Work fine on wp 6.6.2 and wp 6.6.1 ps : I would request another
tiny feature : add the last ip of login date !

![](https://secure.gravatar.com/avatar/b9a182d38d921269ac718934cd3409ec69a6030d4ab9b3a12fa45da7acc870b2?
s=60&d=retro&r=g)

### 󠀁[Works WP 6.5](https://wordpress.org/support/topic/works-wp-6-5/)󠁿

 [flyingkites](https://profiles.wordpress.org/flyingkites/) 2024 年 4 月 3 日

Switched to this plugin as another similar plugin by YooHoo was incompatible with
TwoFactor. This works with both TwoFactor and Limit Login Attempts plugins. [Anyone
who says it does not work likely has a code conflict with another plugin]

![](https://secure.gravatar.com/avatar/43ee378e90b73c9da2f7f08d718a9cafb904b6ca7d0df77f14ed7534b76f3a69?
s=60&d=retro&r=g)

### 󠀁[Excellent + now compatible with Two Factor](https://wordpress.org/support/topic/excellent-now-compatible-with-two-factor/)󠁿

 [DigitalGdn](https://profiles.wordpress.org/bkno/) 2023 年 12 月 27 日

Well maintained plugin. This is the only 'last login' plugin I have found that supports
two factor.

![](https://secure.gravatar.com/avatar/37facd0cc4fcd291eed0963ebcdb1b9984be2d9337f09ff8460c488996aca1cc?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work, sadly](https://wordpress.org/support/topic/doesnt-work-sadly-3/)󠁿

 [editorialteamnwu](https://profiles.wordpress.org/editorialteamnwu/) 2023 年 1 
月 30 日

Totally useless: every user is listed as never having logged in, even the one I'm
currently logged in as to view this. Two stars instead of one because at least it
didn't seem to break anything.

 [ 阅读所有26条评价 ](https://wordpress.org/support/plugin/wp-last-login/reviews/)

## 贡献者及开发者

「WP Last Login」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Konstantin Obenland ](https://profiles.wordpress.org/obenland/)

「WP Last Login」插件已被翻译至 11 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/wp-last-login/contributors)
为本插件所做的贡献。

[帮助将「WP Last Login」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-last-login)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-last-login/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/wp-last-login/)，或通过[RSS](https://plugins.trac.wordpress.org/log/wp-last-login/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-last-login/)。

## 更新日志

### 9

 * Added the `wpll_no_login_output` filter to customize what is displayed for users
   without a recorded login. See [https://wordpress.org/support/topic/feature-request-filter-the-for-users-without-login-data/](https://wordpress.org/support/topic/feature-request-filter-the-for-users-without-login-data/)

### 8

 * Fixed users with no recorded login being dropped from the list when sorting by
   Last Login.
 * Removed the activation routine that seeded a default value for every existing
   user, which could time out on sites with large user bases. Sorting no longer 
   depends on it. Props @fwielstra.
 * Replaced the “Never.” placeholder with a neutral em-dash and an explanatory tooltip.
 * Raised the minimum PHP version to 8.1. PHP 7.4 and 8.0 reached end of life and
   no longer receive security updates.
 * Tested up to WordPress 7.1.

### 7

 * Added compatibility with Two Factor plugin. Props @bkno.
 * Improved date display to display login time on hover.

### 6

 * Revamped file structure to remove unnecessary files.
 * Fixed a bug where login dates were overwritten on plugin reactivation. Props @
   richardbuff.

### 5

 * Improved uninstall routine (no longer queries all users).
 * Updated utility class.
 * Tested with WordPress 6.1.

### 4

 * Improved date display to account for the timezone of the site. Props @knutsp.

### 3

 * Fixed a bug where users who haven’t logged in disappear from user lists when 
   ordering by last login. See [https://wordpress.org/support/topic/new-users-dont-get-the-meta-field/](https://wordpress.org/support/topic/new-users-dont-get-the-meta-field/)

### 2

 * Maintenance release.
 * Updated code to adhere to WordPress Coding Standards.
 * Tested with WordPress 5.0.

### 1.4.0

 * Fixed a long standing bug, where sorting users by last login didn’t work.
 * Tested with WordPress 4.3.

### 1.3.0

 * Maintenance release.
 * Tested with WordPress 4.0.

### 1.2.1

 * Reverts changes to wp_login() as the second argument seems not to be set at all
   times.

### 1.2.0

 * Users are now sortable by last login!
 * Updated utility class.
 * Added Danish translation. Props thomasclausen.

### 1.1.2

 * Fixed a bug where content of other custom columns were not displayed.

### 1.1.1

 * Updated utility class.

### 1.1.0

 * Made the display of the column filterable.
 * Widened the column a bit to accommodate for large date strings.

### 1.0

 * Initial Release.

## 额外信息

 *  版本 **9**
 *  最后更新：**1 周前**
 *  活跃安装数量 **10,000+**
 *  WordPress 版本 ** 6.5 或更高版本 **
 *  已测试的最高版本为 **7.1.3**
 *  PHP 版本 ** 8.1 或更高版本 **
 *  语言
 * [Arabic](https://ar.wordpress.org/plugins/wp-last-login/) 、 [Danish](https://da.wordpress.org/plugins/wp-last-login/)、
   [Dutch](https://nl.wordpress.org/plugins/wp-last-login/) 、 [English (US)](https://wordpress.org/plugins/wp-last-login/)、
   [Finnish](https://fi.wordpress.org/plugins/wp-last-login/) 、 [French (France)](https://fr.wordpress.org/plugins/wp-last-login/)、
   [German](https://de.wordpress.org/plugins/wp-last-login/) 、 [Italian](https://it.wordpress.org/plugins/wp-last-login/)、
   [Norwegian (Bokmål)](https://nb.wordpress.org/plugins/wp-last-login/) 、 [Spanish (Chile)](https://cl.wordpress.org/plugins/wp-last-login/)、
   [Spanish (Spain)](https://es.wordpress.org/plugins/wp-last-login/) 和 [Swedish](https://sv.wordpress.org/plugins/wp-last-login/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/wp-last-login)
 * 标签
 * [admin](https://cn.wordpress.org/plugins/tags/admin/)[last login](https://cn.wordpress.org/plugins/tags/last-login/)
   [login](https://cn.wordpress.org/plugins/tags/login/)[user](https://cn.wordpress.org/plugins/tags/user/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-last-login/advanced/)

## 评级

 3.8 星（最高 5 星）。

 *  [  14 条 5 星评价     ](https://wordpress.org/support/plugin/wp-last-login/reviews/?filter=5)
 *  [  3 条 4 星评价     ](https://wordpress.org/support/plugin/wp-last-login/reviews/?filter=4)
 *  [  2 条 3 星评价     ](https://wordpress.org/support/plugin/wp-last-login/reviews/?filter=3)
 *  [  3 条 2 星评价     ](https://wordpress.org/support/plugin/wp-last-login/reviews/?filter=2)
 *  [  4 条 1 星评价     ](https://wordpress.org/support/plugin/wp-last-login/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/wp-last-login/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-last-login/reviews/)

## 贡献者

 *   [ Konstantin Obenland ](https://profiles.wordpress.org/obenland/)

## 支持

最近两个月解决的问题：

     总计 2，已解决 2

 [查看支持论坛](https://wordpress.org/support/plugin/wp-last-login/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K32M878XHREQC)