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:

  1. Immediately soft-removes the site from the CloudAIPilot database (site no longer appears in the dashboard).
  2. 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)
  1. 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

  1. Open the site detail.
  2. Go to SettingsDanger Zone.
  3. Click Delete Site.
  4. A confirmation dialog appears. Type the exact site name to confirm (e.g., type my-blog if the site is named my-blog).
  5. 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

IssueLikely causeFix
"CONFIRMATION_REQUIRED" errorSite name typed incorrectlyType the exact site name as shown — it is case-sensitive.
Cleanup job failsSSH connectivity issue or disk lockCheck 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 deletionNginx reload failed during cleanupSSH in and run sudo nginx -t to check config, then sudo systemctl reload nginx.

Related Articles