10up / MU-Migration

This WP-CLI plugin makes the process of moving sites from single WordPress sites to a Multisite instance (or vice-versa) much easier. It exports everything into a zip package which can be used to automatically import it within the desired Multisite installation.
MIT License
329 stars 47 forks source link

Zip archive inconsistent while import #85

Closed marcelo2605 closed 3 years ago

marcelo2605 commented 4 years ago

Describe the bug Error when try tu run mu-migration import all

Steps to Reproduce

  1. Export a single site from a multisite using wp mu-migration export all subsite-1.zip --themes --plugins --uploads --blog_id=1
  2. Create a fresh WordPress single instalattion
  3. Run lando wp mu-migration import all subsite-1.zip --new_url=https://new-domain.lndo.site
[21-Oct-2020 19:44:59 UTC] PHP Fatal error:  Uncaught Alchemy\Zippy\Exception\RuntimeException: Zip archive inconsistent in /var/www/.wp-cli/packages/vendor/alchemy/zippy/src/Adapter/ZipExtensionAdapter.php:235
Stack trace:
#0 /var/www/.wp-cli/packages/vendor/alchemy/zippy/src/Adapter/ZipExtensionAdapter.php(226): Alchemy\Zippy\Adapter\ZipExtensionAdapter->getResource('subsite-new.zip', 4)
#1 /var/www/.wp-cli/packages/vendor/alchemy/zippy/src/Adapter/AbstractAdapter.php(48): Alchemy\Zippy\Adapter\ZipExtensionAdapter->createResource('subsite-new.zip')
#2 /var/www/.wp-cli/packages/vendor/alchemy/zippy/src/Zippy.php(92): Alchemy\Zippy\Adapter\AbstractAdapter->open('subsite-new.zip')
#3 /var/www/.wp-cli/packages/vendor/10up/mu-migration/includes/helpers.php(287): Alchemy\Zippy\Zippy->open('subsite-new.zip')
#4 /var/www/.wp-cli/packages/vendor/10up/mu-migration/includes/commands/class-mu-migration-import.php(425): TenUp\MU_Migration\Helpers\extract('subsite-new.zip', 'mu-migration160...')
#5 [internal function]: TenUp\MU_Migration\Commands\ImportCommand->all in /var/www/.wp-cli/packages/vendor/alchemy/zippy/src/Zippy.php on line 94

Environment information

version: 5.5.1 site_language: en_US user_language: en_US timezone: -04:00 permalink: /%postname%/ https_status: true multisite: true user_registration: false blog_public: 1 default_comment_status: closed environment_type: production user_count: 14 site_count: 5 network_count: 1 dotorg_communication: true

wp-dropins (1)

sunrise.php: true

wp-active-theme

name: Test theme version: 1.0 author: Dev parent_theme: none theme_features: core-block-patterns, post-formats, post-thumbnails, menus, widgets theme_path: /app/wordpress/wp-content/themes/test auto_update: Disabled

wp-themes-inactive (3)

ImagesMena: version: 1.0, author: blossom,Auto-updates disabled MenCare: version: 1.0.0, author: Dev,Auto-updates disabled SOWF: author: Circle Digital & the WordPress team Word sdf, version: (undefined),Auto-updates disabled

wp-plugins-active (20)

ActiveCampaign: version: 8.0.3, author: ActiveCampaign, Auto-updates disabled Add From Server: version: 3.3.3, author: Dion Hulse (latest version: 3.4.4), Auto-updates disabled Advanced Custom Fields PRO: version: 5.8.12, author: Elliot Condon (latest version: 5.9.1), Auto-updates disabled Category Order and Taxonomy Terms Order: version: 1.5.7.3, author: Nsp-Code, Auto-updates disabled iThemes Sync: version: 2.1.6, author: iThemes (latest version: 2.1.7), Auto-updates disabled MCE Table Buttons: version: 3.3, author: Jake Goldman, 10up, Oomph, Auto-updates disabled Polylang: version: 2.8.3, author: WP SYNTEX, Auto-updates disabled Post Types Order: version: 1.9.4.3, author: Nsp Code (latest version: 1.9.5.2), Auto-updates disabled Test Newsletter Manager: version: 1.1.4, author: Dev, Auto-updates disabled Redirection: version: 4.8, author: John Godley, Auto-updates disabled Regenerate Thumbnails: version: 3.1.3, author: Alex Mills (Viper007Bond), Auto-updates disabled SearchWP: version: 3.1.13, author: SearchWP, LLC, Auto-updates disabled SearchWP Fuzzy Matches: version: 1.4.4, author: SearchWP, LLC, Auto-updates disabled SearchWP Polylang Integration: version: 1.3.0, author: SearchWP, Auto-updates disabled SearchWP Term Synonyms: version: 2.4.14, author: SearchWP, LLC, Auto-updates disabled Smush: version: 3.7.1, author: WPMU DEV, Auto-updates disabled User Activation Keys: version: 4.6, author: D. Sader, Auto-updates disabled WooSidebars: version: 1.4.5, author: WooCommerce, Auto-updates disabled WordPress MU Domain Mapping: version: 0.5.5.1, author: Donncha O Caoimh, Auto-updates disabled Yoast SEO: version: 12.2, author: Team Yoast (latest version: 15.1.1), Auto-updates disabled

wp-plugins-inactive (10)

Disqus for WordPress: version: 3.0.17, author: Disqus, Auto-updates disabled Easy Social Share Buttons for WordPress: version: 6.2.1, author: CreoApps, Auto-updates disabled GDPR Cookie Consent Banner: version: 2.3.15, author: termly, Auto-updates disabled Google Analytics for WordPress by MonsterInsights: version: 7.10.4, author: MonsterInsights (latest version: 7.12.3), Auto-updates disabled Google Tag Manager for Wordpress: version: 1.11.4, author: Thomas Geiger (latest version: 1.11.5), Auto-updates disabled iThemes Security Pro: version: 6.6.0, author: iThemes, Auto-updates disabled Media File Renamer (Auto Rename): version: 4.6.9, author: Jordy Meow (latest version: 5.0.8), Auto-updates disabled Rename Users: version: 1.2, author: Florian Schiessl, Auto-updates disabled Search Regex: version: 1.4.16, author: John Godley (latest version: 2.3.3), Auto-updates disabled Simple Share Buttons Adder: version: 7.7.1, author: Simple Share Buttons (latest version: 8.0.1), Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1687 imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org file_uploads: File uploads is turned off post_max_size: 100M upload_max_filesize: 100M max_effective_size: 100 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 122 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 786432 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 4 gd_version: bundled (2.1.0 compatible) ghostscript_version: 9.26

wp-server

server_architecture: Linux 5.4.0-52-generic x86_64 httpd_software: Apache/2.4.25 (Debian) php_version: 7.3.23 64bit php_sapi: apache2handler max_input_variables: 10000 time_limit: 90 memory_limit: 1G max_input_time: 900 upload_max_filesize: 100M php_post_max_size: 100M curl_version: 7.52.1 OpenSSL/1.0.2u suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: false

wp-database

extension: mysqli server_version: 5.7.29 client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /app/wordpress/wp-content WP_PLUGIN_DIR: /app/wordpress/wp-content/plugins WP_MAX_MEMORY_LIMIT: 1G WP_DEBUG: true WP_DEBUG_DISPLAY: false WP_DEBUG_LOG: true SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_LOCAL_DEV: undefined DB_CHARSET: utf8 DB_COLLATE: undefined

wp-filesystem

wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable

`

marcelo2605 commented 4 years ago

An update: when I run wp mu-migration export all subsite-1.zip --blog_id=1 I can import the database without any error. Maybe this error was related with the size of my uploads folder (almost 9GB).

nicholasio commented 4 years ago

@marcelo2605 Thanks for the bug report. You might be right, the size of your uploads folder might be the issue. My suggestion is to migrate the uploads folder separately with something like rsync