Skip to content

Deprecated: wpmu_new_blog is deprecated since version 5.1.0 #1

@MadtownLems

Description

@MadtownLems

When adding a new site, the following error occurs when WP_DEBUG is enabled. Then the classic "Cannot modify header information" shuts down the rest of the page.

Deprecated: wpmu_new_blog is deprecated since version 5.1.0! Use wp_insert_site instead.

When replicating a site, the same error is displayed at the top of sites.php?page=wp-replicator but not in such a way that prevents page load due to Cannot modify header information.

Of course, simply swapping 'wpmu_new_blog' for 'wp_insert_site' doesn't magically solve the issue, as these hooks take wildly different parameters:

https://developer.wordpress.org/reference/hooks/wpmu_new_blog/
https://developer.wordpress.org/reference/hooks/wp_insert_site/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions