How to remove a website (without keeping the root category)
Log into you Magento store and backup your website before any changes.
Configure the CMS Static Blocks
- Go to Content > Blocks section.
- To view all CMS static blocks per one page, select 100 from the Display items per page option dropdown.
You need make all static blocks to be available for all store views.
- Find the left_custom_block static block.
- Choose Edit from the Action column.
- Move to the option and select All Store Views.
- Save the block settings.
Do the same for the following blocks:
Not to create complex structure and prevent Magento errors, you need to:
☓ DELETE all customers’ records which are assigned to the website you want to remove
✓LEAVE all customers’ records for the website you want to keep
So, if you want to keep the Bikes Website, you need to delete all the customers from the Medical, Furniture, Spare Parts and Lingerie websites.
We will keep the Medical website, as an example, and remove the Bikes, Furniture, Spare Parts and Lingerie websites.
This means, we should delete all customers’ records from the Bikes, Furniture, Spare Parts and Lingerie websites.
To be able to delete customers’ records for the website the one should be set as default.
Let’s delete all clients’ records from the Bikes website database.
Follow the next instructions:
- Go to Customers > All Customers and you will see the table in which all customers are listed.
- Select each Customer which is assigned to the Bikes Website and choose Delete from the Actions dropdown.
- Confirm the action by pressing OK.
- Clear the cache.
- Navigate to the Stores > Configuration section.
- Then expand the TEMPLATEMONSTER tab and click on the Layout Switcher tab.
- Now you need to select the theme you want to keep from the Default theme option dropdown.
- Press on theTEMPLATEMONSTER tab and click on the Layout Switcher button.
- Navigate to the Stores > All Stores section.
- Click on the Website name you want to keep. You’ll move to the website settings interface and put a checkmark in the Set As default checkbox.
- Remember to save the website settings.
- First, check if the root category is not set as default for any store.
In order to do this, go to the Stores > All Stores section.
- You need to open each store settings interface (click on the store name link) and check if the root category you want to delete is selected in the Root Category option field.
- If the root category you want to delete (e.g. you want to delete the lingerie store root category) is selected for the store, choose another root category from the Root Category option dropdown.
- Then press the Save Store button.
- Navigate to the Products > Categories section.
- Move to the categories tree and select the root category you want remove.
- Press the Delete button.
- Clear the cache.
Do the same for the rest websites (Furniture, Spare Parts and Lingerie).
Define the theme (website) you want to keep
Method 1 (recommended)
Remove the root category (optional)
Remove unneeded website
- Go to the Stores > All Stores section.
- Click on the Website name link you want to delete (e.g. you want to delete Lingerie store).
- You’ll move to the website settings interface. Press the Delete the Web Site button.
- Decide if you want to create the Backup.
- Then press the Delete Web Site button.
The removing process may take a few minutes to complete.Deleting a website will not delete the information associated with the website (e.g. products, widgets and static blocks etc.). You will be able to delete products, widgets and static block manually.
- Reindex and clear the Magento cache.