How to delete WordPress Site

How To Delete WordPress Site - CodeFlist

Deleting a WordPress installation is not sufficient to remove your site completely. In this post, you will know how to delete WordPress site properly. 

How to delete WordPress site - Contents

Working Mechanism of WordPress

At first, you need to have a concept of the working mechanism of WordPress. It’s your choice to skip this section and read the next sub-topic or continue reading it.

WordPress contains a group of files on your server associated with a database. The database is responsible to store and retrieve all the information on your site. WordPress stores all the information like posts, pages, settings, comments, etc. They even store sensitive information like username and password so it will be easy for you later in case you lose access to the dashboard.

This information is stored as values in different tables in the database. Imagine the database as a huge bag containing different items that are needed in your daily life. The database contains tables that are needed for the site.

Why delete WordPress site?

If you have built the website for a temporary purpose. This may be for the marketing of a specific product or service. When the product or service is no longer available and if you know how to delete WordPress site, then you may want to delete the site when there is not any purpose to run the site.

There may be other reasons to close the site like the closing of the business or merging with some other company. 

If you delete the site from the server, then it becomes unavailable. However, the cached copy of the site as well as results in search pages still exists.

If you have already decided that you no longer need a site, then you should also remove the traces of the site from the internet. By the end of this post, you will learn to delete WordPress site properly from the internet.

How to delete WordPress site permanently?

In order to delete the site permanently, follow these steps:

How To delete WordPress site permanently
How To delete WordPress site permanently

Site Backup

The backup of the site is recommended before you proceed to delete any of your existing sites. This will be useful in the future, if in case you change your mind or if you need to access any content that you posted earlier.

Delete Files

In this step, you need to delete all the files stored on your server. There are different files stored in the server that contains images, media files, themes, plugins, and other files.

Open the File Manager from your respective hosting provider.

Go to the root directory where WordPress is installed. Delete all the files present in that location.

Once you deleted all the files, then you do not need to remove the database associated with it. This is because, when your site is not running, there would be no one to access your database by visiting your site. In any case, if you want to delete the database as well, keep a copy of the database as a backup in the previous step.

Modify Robots.txt File

Make sure that you have deleted all the files in the previous step. Now, you need to close the door for the search engines to your site.

This can be done simply by adding a few lines of codes in the Robots.txt file.

At first, you need to create a new file named Robots.txt in Cpanel. If you do not have access to Cpanel, you can use FTP as well. Add the following lines of code in the Robots.txt file:

These two lines prevent crawlers like Googlebot to crawl your site.  

User-agent: *
Disallow: /

Removing Content

You may have already deleted the site but Google will keep showing your content if your particular posts or pages are already ranked in Google.

Search engines understand the fact that sometimes the website may be down due to some technical difficulties or due to some human errors. They will expect your site to come back online. So, you should tell search engines that now your site is permanently down and you will not come back again.

As you know, .htaccess is one of the sensitive files that you used to handle carefully when you were running a site. Now we need to create a new .htaccess file again.

Similar to the previous step, you need to create a .htaccess file inside the root directory.

Add the following lines of code inside this file:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{HTTP_HOST} ^www\.sample\.com$ [NC]
RewriteRule ^(.*)$ - [L,G]

Replace with your domain name.

When you create and save this file, the site will display Error 410 to all users including the search engines. The crawlers will have access to crawl Robots.txt file from where they can read those two lines of code.

This process takes a certain period of time. If you want to quicken this process, you can go to webmasters to request Google for permanent removal of single or multiple URLs.

If you do not perform this step, Google will keep crawling your site and it will return 404 errors continuously. So, to fix this permanently you need to tell search engines that the site is gone permanently.

Remove Website Archives

The cached version of the site is stored as an archive on the internet. Anyone with internet access can view the cached version of your site even if you delete your site. is one of the biggest sites that store the cached version of your site. You need to contact them manually with the help of email in order to remove snapshots of your content from the Wayback Machine.

When your domain is expired (Make sure that you do not have auto-renew), they will never re-enable archives for that domain again.   

How to delete WordPress Site/Blog (i.e. site)

It’s simple, just go to settings and either delete the site or you may also make the site private so that no one else can view the site except you.


Now you may have learned how to delete WordPress site. Even if you delete the root files, the cached version of the site is stored by Google as long as they want.

We also discussed that the site archives are also stored by some projects. Now-days you even find null sites: i.e. they copy your entire content and publish in their site. It has been a problem to deal with those sites as they will or may not remove your content.

This post is helpful for you to guide to delete a self-hosted site in or even how to delete a WordPress Blog.

Additional Readings