This article provides a solution for when uploading a theme with the same name as one that was previously uploaded, even though the old theme was already deleted, gives you the following error message:
Zip file could not be uploaded - it may be invalid.
Environment: Versions 9.0.6 and 9.0.7.
- Open the theme.xml file, and rename the
- Rename the zip file containing the theme to match the name you just changed in the theme.xml file.
Rename MyTheme.zip to MyTheme2.zip
- Upload the modified theme.
- Go to Admin Console > System Tab.
- Select the Settings tab.
- From the list on the left-hand side, select the Themes option.
- Within the Themes page, you need to select Choose File and select the zip file.
- Click on Upload Theme.
You will be able to upload the theme successfully.