In this quick tutorial, we’ll go through the steps that are required to uninstall a WordPress website from your server.
WordPress is one of the most popular CMS frameworks—you can use it to build websites that may range from a simple blog to a full-fledged eCommerce website. It’s really easy to use and can be set up on your server within minutes.
If you want to learn WordPress, check out our complete guide to using WordPress:
In this article, I'll show you the essential steps in order to uninstall your WordPress website.
What You Need to Delete Your WordPress Site
Before you go ahead and uninstall your website, it’s important to note that you'll also delete all your content and files from that site, and you won’t be able to recover them. If you think you might want to access these files or restore your site in the future, you'll need to back up your site.
To back up your website, you need to back up your code, files, and database. There are different ways you could do the website backup. Either you could use a WordPress plugin which allows you to take a complete backup of your website, or you could manually download code files and export the database from your cPanel or phpMyAdmin.
Check out our complete guide on how to back up your WordPress site before you go any further!
Apart from the backup, you should also know the name of your database which is used in your WordPress installation. We’ll need it when we drop the database in the last section. You can find the name of your database in the wp-config.php file. When you open the wp-config.php file, the following section contains your WordPress database name.
You can use either FTP client software or File Manager in cPanel to browse your website files. The wp-config.php file should be available in the root of your website. Just take a note of your database name, and that’s enough for now.
How to Delete Files
As I said earlier, your WordPress installation consists of two things: files and a database. In this section, we’ll discuss how you could delete all the files in your WordPress installation. Note that this only works for a non-multisite website. Don't use these directions for a site in a multisite network, or you might end up deleting the entire network.
Firstly, if you have FTP access to your website, you could use any FTP client software to connect to your website. Alternatively, you could also use the File Manager feature in your cPanel to reach the WordPress installation directory. Irrespective of the method you use to connect to your website, go to the WordPress installation directory. It should contain directories and files like the following.
Select all these files and directories and delete them. In an FTP client, you can typically right-click and select the Delete option. In the cPanel file manager, you just need to click on the Select All button and hit the Delete button to delete it! Once this is completed, you’ve successfully deleted your WordPress installation files!
How to Delete the WordPress Database
Once you’ve deleted all the files in your WordPress installation, it’s time to delete the database. In this section, we’ll see how to delete your WordPress database.
Again, note that this only works for a non-multisite website. Don't use these directions for a site in a multisite network, or you might end up deleting the database for the entire network.
There are different approaches to deleting your WordPress database. If you have access to the command line, you could run MySQL commands to drop the WordPress database. On the other hand, you could also use the phpMyAdmin tool in cPanel to delete the database. We’ll go through both options.
How to Drop the Database With the CLI Tool
If you have access to the command line, head over to your terminal and run the following command to get into the MySQL shell.
mysql -u YOUR_USERNAME -pYOUR_PASSWORD
You need to replace
YOUR_PASSWORD with your MySQL credentials. Once you’re into the MySQL shell, you need to run the following command to delete your database.
DROP DATABASE YOUR_DATABASE_NAME;
You need to replace
YOUR_DATABASE_NAME with your database name. After running this command, MySQL will delete your database permanently.
How to Drop Database With cPanel
If you don’t have access to the command line or you don’t know how to use it, you could delete it from your cPanel as well.
On your cPanel dashboard, click on the MySQL databases link, and that should list all the databases. Click on the Delete link or icon for your database, and that will delete your WordPress database!
You could also use the phpMyAdmin tool to delete your database. Head over to your phpMyAdmin page and select the database which you want to delete. Next, go to the Operations tab and click on the Drop the database (DROP) link, as shown in the following screenshot.
Be very careful if you're manually deleting a database. Be sure you're deleting the right one!
Today, we discussed different options that you could use to uninstall your WordPress installation.
If you want to learn how to make a WordPress site from A to Z, be sure to check out our complete guide.
You can also learn how to use WordPress with our free online course.
Subscribe below and we’ll send you a weekly email summary of all new Web Design tutorials. Never miss out on learning about the next big thing.Update me weekly
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post