Skip to content

Shopware Instance – Delete Console Commands

ClickUp

IUS-3382 – IRP ShopwareInstance delete console command

Two Artisan console commands are available to safely delete a ShopwareInstance or a ShopwareInstance SalesChannel from the IRP. Both commands ask for explicit confirmation before performing any destructive action, and they handle all related records — soft-deletes where applicable, hard-deletes where not.


1. Delete a ShopwareInstance

php artisan shopware-instance:delete {shopware_instance_id}
Argument Description
shopware_instance_id The ID of the ShopwareInstance to delete

What happens

The command shows the ShopwareInstance details and asks for confirmation before proceeding. On confirmation, it (soft)deletes all related records.

For example::

  • ShopwareInstance->shopwareSalesChannels
  • ShopwareInstance->shopwareInstanceProduct
  • ShopwareInstance->shopwareInstanceProductVariants
  • ShopwareInstance->shopwareInstanceProductConfigurations
  • shopwareInstanceAttributeMappings
  • shopwareInstanceModelMappings
  • shopwareInstanceBrandMappings
  • shopwareInstanceMediaMapping
  • shopwareInstanceProductConditionMappings
  • shopwareInstanceProductParticularityMappings
  • shopwareInstanceRefurbisherMappings
  • shopwareInstanceApprovedRefurbishedMappings
  • shopwareInstanceTagMappings
  • shopwareInstanceCustomFields
  • Records in shopware_instance_price_rule matching the ShopwareInstance ID
  • Records in product_variant_shopware_instance matching the ShopwareInstance ID

After all related records are removed, the ShopwareInstance itself is deleted.

Irreversible data loss

Mapping records and price rule entries are permanently deleted. Only the records listed under soft-deleted can be recovered if needed.

Example

$ php artisan shopware-instance:delete 3

 ShopwareInstance found:
 - ID:   3
 - Name: Refurbished Direct (NL)
 - URL:  https://www.refurbished.nl

 Are you sure you want to delete this ShopwareInstance and all related records? (yes/no) [no]:
 > yes

 Soft-deleting related records...
 Deleting mappings and price rules...
 ShopwareInstance deleted successfully.

2. Delete a ShopwareInstance SalesChannel

php artisan shopware-sales-channel:delete {shopware_sales_channel_id}
Argument Description
shopware_sales_channel_id The ID of the ShopwareSalesChannel to delete

What happens

The command shows the SalesChannel details and asks for confirmation. On confirmation, the SalesChannel record is deleted along with its directly related data.

Irreversible

This action permanently removes the SalesChannel and cannot be undone.

Example

$ php artisan shopware-sales-channel:delete 12

 ShopwareSalesChannel found:
 - ID:     12
 - Name:   Storefront NL
 - Domain: https://www.refurbished.nl

 Are you sure you want to delete this SalesChannel? (yes/no) [no]:
 > yes

 SalesChannel deleted successfully.

When to use these commands

Use these commands when:

  • A Shopware integration is permanently decommissioned and must be removed from the IRP.
  • A SalesChannel has been removed from Shopware and should no longer exist in the IRP.
  • Cleaning up test or staging Shopware instances from a production or acceptance environment.

Prefer soft-deletes where possible

For temporary deactivation of a Shopware integration, consider disabling the instance instead of deleting it. Use these commands only when a permanent removal is intended.