Delete Portal
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Deletes a DNN portal (site) from the installation, using DNN's own portal deletion. The portal is removed from the database, together with its content, and its files are deleted from disk.
Deleting a portal can't be undone. Its pages, modules and files are removed. Back up the database and the portal's folder first if you might need them.
This action is part of the Portal Management add-on, which is installed and licensed separately (feature package PORTAL). If it isn't licensed, the action fails with a not-licensed error.
Typical Use Cases
- Remove a customer's site when their subscription ends
- Clean up test or demo portals created with Create Portal
Don't use it to
- Delete a page. Use Delete Page (Soft) or Delete Page (Hard) instead.
- Take a portal offline for a while. There's no undo, so deleting isn't the same as disabling.
Related Actions
| Action Name | Description |
|---|---|
| Load Portal | Checks the portal exists and shows its name before you delete it. |
| Create Portal | Creates a portal. |
| Update Portal | Changes a portal's details. |
| Delete Page (Hard) | Deletes a single page permanently. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Portal Identifier | The portal to delete, as a portal ID (for example 3) or portal GUID. Unlike Load Portal and Update Portal, an empty value doesn't mean the current portal. | Yes | empty string | Yes |
Output Parameters Reference
This action doesn't produce any output tokens.
Considerations
- The identifier must be an ID or a GUID. An empty value, anything else, or an ID that doesn't exist makes the action fail with
DeletePortal action: Could not identify portal. - Nothing stops you from deleting the current portal. If the ID is the portal the action runs on, that portal is deleted. Check the ID with a condition first.
- There's no permission check in the action. Anyone who can run it can delete any portal in the installation. Only put it where host users (superusers) can reach it, and add a condition as a second guard.
- DNN decides what's removed. The action calls DNN's portal deletion and doesn't report DNN's result. For example, DNN won't delete the last portal in an installation, and the action still finishes without an error. Run Load Portal afterwards if you need to confirm the portal is gone.
Examples
To understand how to use the below examples, please see Running Examples.
1. Delete a portal, but never the current one
This action deletes the portal in [SelectedPortalId]. The condition skips it when the ID is empty or is the current portal's ID, [Portal:PortalId].
{
"Title": "Delete Portal",
"ActionType": "DeletePortal",
"Description": "Delete the selected portal",
"Condition": "[SelectedPortalId] != \"\" && [SelectedPortalId] != [Portal:PortalId]",
"Parameters": {
"PortalIdentifier": "[SelectedPortalId]"
}
}
Revised 09/27/2026