Delete a Site Safely
Who this is for
Users who need to remove a site from a server and want to understand what the deletion process removes.
Prerequisites
- You have Owner or Admin role in the organization.
- You have exported or backed up any data you want to keep before deleting.
What Site Deletion Does
Deleting a site in CloudAIPilot:
- Immediately soft-removes the site from the CloudAIPilot database (site no longer appears in the dashboard).
- Queues a background job that cleans up the server:
- Removes the site's document root directory and all files
- Drops the associated database and database user
- Removes the Nginx vhost configuration file
- Revokes the SSL certificate
- Removes the SFTP user (if set up)
- Reloads Nginx after cleanup.
⚠️ Site deletion is permanent. Files, the database, and all site content are deleted from the server and cannot be recovered from within CloudAIPilot. Ensure you have a backup before proceeding.
How to Delete a Site
- Open the site detail.
- Go to Settings → Danger Zone.
- Click Delete Site.
- A confirmation dialog appears. Type the exact site name to confirm (e.g., type
my-blogif the site is namedmy-blog). - Click Confirm Delete.
The site disappears from the dashboard immediately. The server cleanup runs in the background (1–2 minutes).
Before You Delete
Checklist before deleting a site:
- [ ] Export / backup the database (from Backups tab or via SSH mysqldump)
- [ ] Download any media files or user uploads you want to keep
- [ ] Note git repository URL and any custom configurations
- [ ] Cancel any active backup schedules for this site
- [ ] Update or remove any DNS records pointing to this site
- [ ] Inform your team
What Is NOT Deleted
- The server itself — only the site resources are removed.
- Other sites on the same server are unaffected.
- CloudAIPilot audit logs referencing this site are retained.
- If you have offsite backups stored in cloud storage, those are not automatically deleted.
What Success Looks Like
The site no longer appears in the Sites list. Visiting the domain in a browser returns a 404 or connection refused. The database no longer exists on the server.
Common Issues and Fixes
| Issue | Likely cause | Fix |
|---|---|---|
| "CONFIRMATION_REQUIRED" error | Site name typed incorrectly | Type the exact site name as shown — it is case-sensitive. |
| Cleanup job fails | SSH connectivity issue or disk lock | Check Activity Center for the error. The site record is already soft-deleted in CloudAIPilot. Use the Terminal to manually remove the site files if the job keeps failing. |
| Nginx shows an error page after deletion | Nginx reload failed during cleanup | SSH in and run sudo nginx -t to check config, then sudo systemctl reload nginx. |
Related Articles
- KB-03-16: Archive vs Delete *(coming in a future update)*
- KB-05-02: Manual Backup Before Deletion