# "Created By" Column in the Network Sites List

> Records which user created each new site and shows it in a column in Network Admin > Sites, which helps on networks where staff or customers create their own sites.

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

## Code

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

add_action( 'wp_initialize_site', function ( $site, $args ) {
    $user_id = ! empty( $args['user_id'] ) ? (int) $args['user_id'] : get_current_user_id();

    if ( $user_id ) {
        update_site_meta( $site->blog_id, 'wpide_created_by', $user_id );
    }
}, 300, 2 );

if ( ! is_admin() ) {
    return;
}

add_filter( 'wpmu_blogs_columns', function ( $columns ) {
    $columns['wpide_created_by'] = __( 'Created by' );

    return $columns;
} );

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

    $user = get_userdata( (int) get_site_meta( $blog_id, 'wpide_created_by', true ) );

    if ( $user ) {
        printf( '<a href="%1$s">%2$s</a>', esc_url( network_admin_url( 'user-edit.php?user_id=' . (int) $user->ID ) ), esc_html( $user->user_login ) );
    } else {
        echo '&mdash;';
    }
}, 10, 2 );
```

## Notes

Only sites created after activation are recorded; earlier ones show a dash.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Created By" 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/
