Studio: Remove wp-content on import - #489
Merged
Merged
Conversation
wojtekn
reviewed
Aug 21, 2024
| continue; | ||
| } | ||
|
|
||
| await shell.trashItem( contentPath ); |
Contributor
There was a problem hiding this comment.
Let's delete those instead of trashing them. Running multiple imports produces many plugins/themes/uploads entries in the trash, which can be confusing. The confirmation window already makes it clear that import will replace all files and the database.
Ideally, we back up the whole site directory before import starts and revert to that state if import fails, but it would be an idea for another issue. The current solution tries to implement that, but not in a robust way.
jeroenpf
reviewed
Aug 21, 2024
jeroenpf
approved these changes
Sep 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/Automattic/dotcom-forge/issues/8713
Proposed Changes
This PR removes the
wp-contentfolder on import to avoid merging the current content with the incoming imported content.NOTE: We keep
database,db.phpandmu-pluginsfolder to avoid messing up withsqlite-integration-pluginand the rest ofmu-pluginsthat are needed by StudioTesting Instructions
Pre-merge Checklist