Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

wpmu_new_blog is deprecated since version 5.1.0! Use wp_insert_site instead. #92

Description

@splaquet

Describe the bug

I've noticed that running imports/migrations into new/different WPMU environments haven't worked the same as they previously had.

The issue is when I import a package into a new WPMU, it isn't creating a new subsite. It's going through all of the steps, but the only evidence is in the database. Database imports correctly with the next site ID, but there's no sign that a new site has been created in /WP/network/sites.php dashboard.

I've been able to work around these issues by creating a new subsite w/ slug, and then importing into that site_id. I had forgotten to pre-add the subsites this time. And, I had a brand new server with a brand new WPMU install on a brand new URL, so without any history or existing sites, I'm going to assume that the following error was caused/created by a MU-Migration import.

here's my CLI command:
wp mu-migration import all vanillaexport.zip --new_url=vanilla.schittscreek.cloud --blog_id=2

here's the error line I found in the server's nginx access.log:
2021/05/01 19:37:05 [error] 389#0: *324 FastCGI sent in stderr: "PHP message: PHP Deprecated: wpmu_new_blog is <strong>deprecated</strong> since version 5.1.0! Use wp_insert_site instead. in /public_html/wp-includes/functions.php on line 5236" while reading response header from upstream, client: 162.158.63.91, server: newdomain.cloud, request: "POST /wp-admin/network/site-new.php?action=add-site HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "newdomain.cloud", referrer: "http://newdomain.cloud/wp-admin/network/site-new.php?id=2"

here's an error line that I just now found in the account's debug.log:
PHP Warning: Attempt to read property "domain" on bool in /home/user/.wp-cli/packages/vendor/10up/mu-migration/includes/helpers.php on line 160

Steps to Reproduce

outlined above. please let me know if any clarification is needed.

Expected behavior
new site is created (and visible in WPMU/network) after export has run

Environment information

  • Operating System: Amazon Linux 2

  • Kernel: Linux 5.10.29-27.126.amzn2.x86_64

  • Architecture: x86-64

  • brand new WPMU install

  • all plugins disabled on master network site ID 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions