When clients ask me how to delete their WordPress blog, after a couple minutes of conversation I learn that, in most cases, they just want to take it off the web temporarily. To do that is very simple. I’ll explain how below but if you truly want to delete the blog and everything associated with it, I’ll go through the steps for that in this article as well.
This can also come in handy if you want to do a clean WordPress re-install.
Video: Deleting a WordPress Web Site
How to do a full clean WordPress site deletion (including Name Server Modification and File Deletion).
Written Instruction
1) Change the Name Servers for the Domain to “Parked” or Something Else
It’s not at all necessary to delete a WordPress blog to remove it from the web. Here’s how it all works:
The web site files reside in a folder on a server computer for a WordPress site. Internally, a domain (or subdomain) is mapped to that folder. But it takes one extra step to make that domain actually “point” to the web site to be browsable by the web. Externally (or possibly internally when the web site host is the same as the domain name host) name servers have to be added to a domain so it knows the IP Address of the server that contains the web site files. And providing the server has the proper internal “mapping” to the folder where the web sites files reside (and there is an appropriate “index” file in there) the web site will serve when the domain is accessed through a web browser.
There is sometimes a lag between modifying the name servers for a domain and when it actually takes effect so watch for that. It’s called domain propogation. All Internet Service Providers (the company that provides the means at which you connect to the Internet: Google Fiber, Bell, Cogeco, Comcast, etc.) will all propogate at different times, so keep that in mind as well when you are trying to have a friend or colleague access the web site after a name server change.
At any rate, all the links in the chain above have to be in place for the web site to “serve.” So, detouring the name servers (the “top” link in the chain) to either a “parked” web site location (some hosts provide that option), or the default name servers that the domain host provides, will break the chain. This makes it so that the web site is inaccessible by the public, all the while without destroying or deleting the files.
2) If Deleting is Still Desired, Start with the Database
There’s no rhyme or reason to start with the database but it’s a good a place as any. A lot of people just delete the WordPress files when deleting a site, which will certainly make it inaccessible, but this leaves an orphan database. There will also be a user associated with a database as well. I personally make it a habit to create new users for every database, but some people will use the same user for more than one. In these steps I will show you how to delete the database user as well, but be sure it isn’t attached to other databases before doing so (I’ll explain how).
Follow the steps below to delete the database and its user:
Note: I am using a shared hosting account at HostGator for these steps, so therefore I am using CPanel. If you are working from CPanel as well, these steps should work just fine for you.
- Login to your hosts Control Panel.
- Scroll down and locate the Databases box and click the MySQL Databases icon.
- Locate the database that you want to remove and click the Delete Database text link next to it. Note: If you are unsure of what the database is called, you can login (via FTP or File Manager) and have a look at the “wp-config.php” file that resides in the root of the web site. The names of the database and its user will be stored in that file.
- Confirm your decision to delete by clicking the Delete Database button. Then click the Go Back button to continue on.
Now, at the bottom of the screen you will see a list of Current Users. Depending on the way things were set up, there may now be an orphan user since the database it was attached to has been deleted. You will be able to see from the list of Current Databases if the user that you intend to remove is still associated with an existing database. Peep the Users column to see.
You will not be warned if the user is still associated with an existing database when attempting to delete it. If you find that one of your sites isn’t working because of an accidental user account deletion, you can always create a new user and assign it to the database (with all priveleges). Then modify the “wp-config.php” file for the site to reflect the name of the new user and its password.
- Locate the user that you want to delete (keep in mind that the users name can be found in the wp-config.php file of the web site you intend to delete).
- Click the red X image button that shows up in the delete column for that user.
- Confirm your decision to delete by clicking the Delete User button. Click the Home link/icon at the top left to continue on.
3) Use FTP or the File Manager to Delete the WordPress Files and Remove the Mapping for the Add-on Domain
All that’s left to do really is to delete the files and optionally delete the internal “mapping” of the domain to the folder where the web site used to reside.
Using the File Manager is best for two reasons. First, if the domain’s name servers (and/or internal mappings) have already been modified, it’s possible you will no longer be able to connect by FTP the way you have been. This is because you may have been using the “ftp” subdomain of the domain and/or the domain’s FTP account to connect to the FTP server. Secondly, deleting from the File Manager is much faster, so those are the steps I will be following along with here.
You may want to have a quick look at where your web site files reside on the server. If it’s for the main (or only) domain attached to the account, that should be obvious. If it’s for a secondary or add-on domain, in all likelihood there will be a folder off the root matching the name of the domain sometimes without the TLD (the .com, .net, etc.) and that is where the files will reside. But that’s not always the case. A good way to tell for add-on domains is to follow these quick steps.
- From the main screen (home screen) of CPanel, locate the Domains box and click on Addon Domains.
- Scroll down to the Modify Addon Domain section and make note of the Document Root for the domain that you are intending to remove.
- While you are in there, you may as well remove the mapping for the domain. Click the Remove text link under Actions, then click the Remove button to confirm your decision. Click the Home link/icon at the top left to continue on.
Now that you know where your web site files are located on the server, and the domain mapping has been removed, all that is left to do is delete the files. If you are still sure that is what you want to do, here are the steps to accomplish that.
- From the main screen (home screen) of CPanel, locate the Files box and click on File Manager.
- The path to your files for the site will likely begin with “public_html.” You should already be in that folder by default when launching the File Manager. Now locate the folder that you want to remove. If it is a subfolder within a folder you will need to double click on the folder icon on the left of the folder name.
- Once you have located the folder that is holding all of the files, highlight it by clicking (one time) the folder icon. Click the delete button (look for the red ‘x’) at the top of the screen.
- Confirm your decision by clicking the Delete File(s) button.
That’s all there is to deleting a WordPress web site. The files are gone. The database and its user are gone. The internal mapping has been removed. And the name servers are parked. All that’s left to do now is rebuild from scratch or put the domain in the marketplace to see if you can make a profit, or at least get your money back. Best of luck.
This was VERY Helpful, THANK you. I was trying to disable my wp site so I could upload a replacement. I wanted to be sure I took ALL the wp files so the replacement is a clean install onto the server. Thanks very much for the step-by-step.