Skip to content

wp core download --skip-content removes themes/plugins directories outside wp-content #214

@cathal-maverick

Description

@cathal-maverick

Bug Report

Describe the current, buggy behavior

After running wp core download --skip-content the tinymce editor is broken due to missing plugins & themes directories

Describe how other contributors can replicate this bug

  • run wp-core download --skip-content
  • attempt to edit content using the TinyMCE editor
  • the editor is unresponsive & console shows a 404 for js files
  • inspecting the wp-includes/js/tinymce directory shows the plugins & themes directories are both missing

Describe what you would expect as the correct outcome

wp core download --skip-content should only remove the plugins & themes directories in the wp-content directory

Let us know what environment you are running this on

WP-CLI version:	2.7.0

Provide a possible solution

Add an additional check to only remove plugins & themes from the wp-content directory

if ( false !== stripos( $info['name'], 'themes/' ) || false !== stripos( $info['name'], 'plugins/' ) ) {
$zip->deleteIndex( $i );
}

Provide additional context/Screenshots

MicrosoftTeams-image (11)

Bug appears to have been introduced in #212

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions