# "Last Updated" Column in the Network Sites List

> Adds a sortable-looking "Last updated" column to Network Admin > Sites so you can spot sites nobody has touched in months.

- Type: PHP
- Runs: Admin only
- Category: [Multisite](https://wpide.com/library/category/multisite/)
- Tags: network-admin, sites, columns
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/ms-sites-last-updated-column/

## Code

```php
if ( ! is_multisite() ) {
    return;
}

add_filter( 'wpmu_blogs_columns', function ( $columns ) {
    $columns['wpide_last_updated'] = __( 'Last updated' );

    return $columns;
} );

add_action( 'manage_sites_custom_column', function ( $column, $blog_id ) {
    if ( 'wpide_last_updated' !== $column ) {
        return;
    }

    $site = get_site( $blog_id );

    if ( ! $site || '0000-00-00 00:00:00' === $site->last_updated ) {
        echo '&mdash;';
        return;
    }

    $time = strtotime( $site->last_updated . ' UTC' );

    printf(
        '<span title="%1$s">%2$s</span>',
        esc_attr( wp_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $time ) ),
        /* translators: %s: human time difference */
        esc_html( sprintf( __( '%s ago' ), human_time_diff( $time ) ) )
    );
}, 10, 2 );
```

## Notes

The date comes from the site's last_updated field, which WordPress refreshes when content is published.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Last Updated" Column in the Network Sites List" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
