Blog

Deleting a WordPress Site? Keep One Copy

How to delete a WordPress site on WordPress.com or your own host, plus the one full copy to keep first and what else goes with the hosting account.

Part of: Migrations and Site Moves

Backing up WordPress site files and database to the cloud before deleting the site

Deleting a WordPress site takes a few minutes. The hard part is that there's no undo once the host wipes the server. So the short answer to "how do I delete my WordPress site" is this: first make one full copy of the files and the database, open it to prove it works, store it somewhere that isn't the hosting account, and only then press delete.

Most guides walk you through the clicks and stop there. That's fine if you're sure you'll never need the old site again. In practice people come back for things. An old blog post a client still links to. A contact form entry. The invoice page a customer asks about a year later. An email inbox nobody remembered was tied to the hosting plan.

This guide covers both kinds of deletion (WordPress.com and self-hosted WordPress), the last copy you should keep, everything else that disappears with a hosting account, and how long to hang on to the archive.

WordPress.com vs self-hosted: two different deletions

The phrase "delete a WordPress site" means two different jobs, and the steps barely overlap. Work out which one you have before you touch anything.

WordPress.com is the hosted service run by Automattic. You log in at wordpress.com, and you never had FTP, cPanel or a database login of your own (unless you're on a plan that adds them). Deletion happens inside the WordPress.com dashboard.

Self-hosted WordPress is the free software from WordPress.org installed on a web host such as a cPanel shared plan, a VPS or a managed WordPress host. Here, "the site" is a folder of files plus a MySQL or MariaDB database. Deleting it means removing both, and maybe cancelling the hosting plan too.

A quick test: if your site address ends in .wordpress.com, or you pay Automattic for the plan, it's WordPress.com. If you pay a hosting company and log in to a control panel, it's self-hosted.

Deleting a WordPress.com site

According to the WordPress.com delete-a-site guide, the path is short:

  1. Open your Hosting Dashboard and click the site's title.
  2. Go to Settings and scroll to the "Delete site" section at the bottom.
  3. Remove any active paid purchases (plan, domain, email) when prompted.
  4. Type the full site address to confirm, then click Delete Site.

Two details matter here. First, WordPress.com says you can restore a deleted site within 30 days; after that, the data is gone for good. Second, the old .wordpress.com address can never be reused, by you or anyone else.

Don't mix up deleting a site with closing your account. Per the WordPress.com account closure page, closing the account deletes every site you own and retires your username permanently. You also have to remove (not just cancel) every purchase first, including domains. If you only want one site gone, delete the site and leave the account alone.

Deleting a self-hosted WordPress site

There's no "Delete site" button inside self-hosted WordPress. You remove it at the hosting level, and the full steps are in their own section below. The backup step comes first, though, because it's the one that can't be done afterwards.

Before you delete: the last full copy (and how to check it opens)

Think of this as the site's final archive. It isn't a routine backup that gets rotated out next week. It's the one copy you'll reach for in 18 months when someone asks, "do you still have that page?"

A WordPress site has two halves, and you need both. The WordPress.org backups documentation spells it out: the files (core, themes, plugins, uploads, wp-config.php, .htaccess) live in the WordPress folder, while the posts, pages, comments, users and settings live in a separate database. Downloading the folder does not capture the database. We cover this split in more detail in what a WordPress backup actually contains.

What the final archive should hold

  • The whole WordPress folder, usually public_html or a subfolder of it. Include hidden dotfiles such as .htaccess.
  • A complete database dump, as a .sql file (often gzipped).
  • The WordPress export file from Tools → Export. It's an XML file of posts, pages and comments. It won't rebuild the site, but it opens in any WordPress install and is easy to search.
  • A plain list of what the site connected to: domain registrar, DNS provider, email provider, payment gateway, analytics property, form tool. A text file is enough.

On WordPress.com, use the export option during deletion, or Tools → Export beforehand. On paid plans with plugins, you can also download a full backup from the dashboard. On a free plan, the XML export plus a download of your media library is what you get, and what a WordPress export leaves out is worth knowing first.

How to make the copy on a self-hosted site

You have three practical routes:

Your host's backup tool. On cPanel, the Backup page offers a home-directory download and separate database downloads. Grab the database for the right site; on a shared account there may be several. Our cPanel full backup guide walks through it screen by screen.

SSH, if your host allows it. Two commands give you both halves. Run tar -czf site-files.tar.gz public_html for the files and mysqldump with the database name, user and password from wp-config.php for the data. Then download both files over SFTP.

A backup service or plugin. If the site is already backed up somewhere outside the host, download the newest set rather than trusting that it'll still be there after you cancel.

Prove the copy opens before you delete

This is the step almost everyone skips. A backup you've never opened is a guess. Check it in three small ways:

  1. List the archive. Run tar -tzf site-files.tar.gz | head -50, or open the zip on your computer. You should see wp-config.php, wp-content/uploads/ with your year folders, and your theme folder.
  2. Read the end of the database dump. A complete mysqldump file finishes with a line starting -- Dump completed. If the last lines are cut off mid-insert, the dump died partway and is missing tables.
  3. Open the posts table. Search the .sql file for the title of your newest post. If it's there, the content you care about is there.

If you have half an hour, go further and restore it to a local install (LocalWP or a spare subdomain) and click around. That's the only check that proves the site actually comes back. The WordPress handbook on moving sites covers the URL changes you'll hit doing that.

That "dump completed" marker is the same one our own backup runs check. At BackupYourSite, a run isn't allowed to report success unless each archive passes integrity checks and the database dump ends with MySQL's own completion marker. You can read the full sequence on how BackupYourSite backups work. The point for you is simple: look for that line yourself before you destroy the original.

Keep two copies in two places

One copy on your laptop isn't an archive; it's one spilled coffee from gone. The WordPress.org backup guide suggests keeping copies in different locations so one failure doesn't cost you everything. For a site you're deleting, that means at least two places that aren't the hosting account you're about to cancel: say, an external drive and a cloud folder you control.

What else goes when the hosting account goes (email, DNS, SSL)

Here's where deletions turn into surprises. The website is only the visible part of what a hosting account does. Before you cancel, check each of these.

Email on the same plan

Many cPanel plans include mailboxes like info@yourdomain.com. Cancel the plan and those mailboxes, with every stored message, go with it. If anyone still uses that address, export the mail first (most webmail tools offer an export, or connect an email client over IMAP and copy the folders down). Then point the domain's MX records at a new provider before the hosting ends, or mail will start bouncing.

DNS, if the host runs it

If your domain uses the host's nameservers, the DNS zone lives in the hosting account. That zone may hold more than the website: email routing, SPF and DKIM records, verification records for Google Search Console, and records for other tools. Copy the full zone (cPanel's Zone Editor shows it) into a text file before cancelling. If the domain will keep being used, move DNS to the registrar or a dedicated DNS provider first.

The domain itself

Deleting WordPress does not delete your domain. The domain is registered separately, either at a registrar or bundled with the host. If it's bundled, find out what happens to it when the plan ends; some hosts let you transfer it out, and some let it lapse at renewal. If you want to keep the name, transfer it to a registrar you control before you cancel. If a domain does lapse, the recovery rules come from your registrar's terms and ICANN's expired registration recovery policy, so read those before you rely on getting it back.

SSL certificates

Free certificates from the host (usually Let's Encrypt via AutoSSL) simply stop when the hosting stops. That's fine if the site is truly gone. If you're moving the domain somewhere else, the new host issues its own certificate. If you bought a paid certificate, note its expiry and whether it can be reissued for a new server.

Things that point at the site

Analytics, Search Console, payment gateways, form tools, and uptime monitors all keep data about the site, and some keep firing at it after it's gone. Export what you need from each (Search Console performance data, for example, only goes back 16 months), then remove the property or webhook so you're not paying for or getting alerts about a dead site.

Deleting a self-hosted site: files, database, database user

With the archive checked and the side services sorted, the deletion itself is three parts. Removing only the files leaves a database (and a database user with a password) sitting on the server, which is untidy at best and a security loose end at worst.

1. Remove the files

In cPanel's File Manager, open the folder WordPress lives in. If it's the main site, that's public_html. Switch on "show hidden files" so you catch .htaccess and any other dotfiles, select everything that belongs to WordPress, and delete. Over SSH, it's an rm -rf on the WordPress folder; double-check the path before pressing Enter, because there's no trash can on a server.

On shared accounts with several sites, be careful: addon domains are often subfolders inside public_html. Delete only the folder for the site you mean.

2. Drop the database

Open wp-config.php (before you delete it, or from your archive) and note DB_NAME and DB_USER. In cPanel, go to MySQL Databases, find that database name, and delete it. Using phpMyAdmin instead? Select the database and use the Drop option. If several WordPress installs share one database with different table prefixes, drop only the tables with this site's prefix.

3. Delete the database user

Still on the MySQL Databases page, scroll to Current Users and delete the user from DB_USER. Leaving it there means a working username and password for your server sits in an archive file and possibly an old email. Removing it closes that door.

4. Tidy the leftovers

Check cron jobs in cPanel for anything that calls the old site's wp-cron.php. Remove FTP accounts you created for it. If the site had its own addon domain or subdomain entry, delete that too. Finally, if the whole hosting plan is going, cancel it with the host and keep the cancellation confirmation email.

Using a one-click installer like Softaculous? It usually has an "uninstall" action that removes files, database and user in one go. It's convenient. It also removes them without asking whether you kept a copy, so do the archive step first regardless.

Starting over instead of deleting

A lot of people searching for how to delete a WordPress site actually want a fresh start on the same domain. Deleting and reinstalling works, but it's not the only way, and it's the riskiest.

On WordPress.com, the delete guide lists gentler options: make the site private, change its address, transfer it, or reset it for a fresh start while keeping the same address.

On self-hosted WordPress, you can delete the content and keep the install. Remove posts and pages, switch to a default theme, delete unused plugins, and empty the media library. Reset plugins exist that wipe the database back to a fresh install while keeping your login. Use those only after the archive step, because they do exactly what they say.

The other option is building the new site on a staging subdomain while the old one stays live, then swapping. Visitors never see a blank page, and you can lift old content across as you go. It takes longer to set up. It's also the only route where nothing is ever "deleted" in a hurry.

Whichever route you pick, take the same final copy first. A fresh start is exactly when people throw out a page they later wish they'd kept.

Keeping the archive: where and for how long

Once the site is gone, the archive is the site. Treat it like a record, not a spare backup.

Where to keep it

At least two locations, neither of them the old host. Label the files plainly: site name, "final archive," and the date. Put a short README next to them listing the PHP and WordPress versions the site ran, the database name, the table prefix, and which theme and key plugins it used. Restoring an old WordPress site years later is much easier when you know what it was built on.

Encrypt the archive if it holds customer data, form entries or order details, because wp-config.php and the database dump contain passwords and personal information. A password-protected zip or an encrypted disk image both work; store the password somewhere other than next to the file.

How long to keep it

That depends on what the site did. A personal blog? Keep it as long as you're curious. A business site is different. If it took orders, sent invoices or recorded payments, those records may count as business records. According to the IRS guidance on keeping records, the general period for income tax records is 3 years, and some situations stretch it to 6 or 7 years. Employment tax records are at least 4 years. If the site held anything like that, keep the archive for at least the longest period that applies to you, and ask your accountant if you're unsure.

We wrote a longer piece on writing a backup retention policy you can actually defend, which covers how to set the number and write it down so you're not guessing later.

Check it once a year

An archive on an old external drive can quietly fail. Once a year, open it: list the tar file, read the end of the dump, search for a known post. It takes ten minutes. If you're keeping archives for several retired client sites, a managed offsite store with a set retention window removes the "which drive was it on" problem; the BackupYourSite plans keep verified copies for up to 15, 30 or 60 days depending on the plan, which suits live sites rather than decade-long archives. For a deleted site, your own two-location copy is the right home.

How we put this guide together

The methodology here is plain. The WordPress.com steps and the 30-day restore window come from WordPress.com's own support pages, linked above. The files-plus-database split comes from the WordPress.org backups documentation. Record-keeping periods come from the IRS page cited. The verification checks (the archive listing and the "Dump completed" line) are the same signals BackupYourSite's own service uses before it lets a run count as a success, and they're worth running before you switch on WordPress maintenance mode for risky work too. We haven't included any statistics on how often deleted sites get restored, because we don't have honest numbers to give you.

Frequently Asked Questions

How do I permanently delete my WordPress site?

On WordPress.com, go to Settings in your Hosting Dashboard, scroll to "Delete site," remove any purchases, type the site address and confirm. It becomes permanent after 30 days. On self-hosted WordPress, delete the WordPress files from your hosting account, drop the site's database and delete its database user. Make and check a full copy first.

Can I recover a WordPress site after deleting it?

On WordPress.com, yes, within 30 days of deletion, from the deleted-sites filter in your dashboard. After that, it's gone. On a self-hosted site, only if you or your host have a backup. Some hosts keep their own short-term backups, but once the hosting account is cancelled, those usually go too.

Does deleting WordPress delete my domain?

No. The domain is registered separately from the site. Deleting a WordPress.com site keeps your account and any domains you registered. On self-hosted sites, the domain stays with whoever it's registered at. Watch out if the domain was bundled with a hosting plan you're cancelling; transfer it out first if you want to keep it.

Should I back up before deleting my WordPress site?

Yes. Deletion can't be undone once the host wipes the data, and people often need old content, form entries or order records later. Take a full copy of the files and the database, check it opens, and store it in two places that aren't the hosting account.

How do I delete WordPress but keep my domain?

Remove the WordPress files and database from your hosting account, but leave the domain registration alone. If the domain uses the host's DNS and you're cancelling the hosting, move DNS to your registrar or another provider first, and copy over any email and verification records so nothing else breaks.