Uninstalling your WordPress site may not be the first skill you’d think to develop during your developer journey. However, there are cases where you may need to uninstall WordPress as part of a migration process, permanent deletion, or something else.
This article explores how to uninstall WordPress from cPanel and the potential reasons why. While it can be nerve-wracking initially, we’ll do our best to present the process in the most beginner-friendly way possible.
Let’s get started.
Uninstall WordPress from cPanel in 6 steps
cPanel is the most popular web hosting control panel, allowing owners and admins to manage websites from a user-friendly interface. While some hosting services like Hostinger have proprietary control panels, most use cPanel as part of their plans.
Using cPanel, the basic process is as follows:
Back up your site first.
Check your database’s name and associated username and password before deleting it.
Delete your database and associated username and password.
Delete all WordPress installation files.
Let’s guide you step-by-step on how to uninstall WordPress using cPanel.
Step 1: Back up your WordPress website
Considering you’re planning to uninstall WordPress, you may not need to create a backup for your site at all. However, if you plan to migrate manually or need to keep your files, configurations, and database just in case you ever retrieve your WordPress site, it may be worth storing a backup.
Step 2: Log in to your cPanel account
To log into your cPanel account, do it from your hosting account’s dashboard or go to your-domain-name.com/cpanel.
Step 3: Navigate to the public_html directory
From the main dashboard, go to the Files section and click on File Manager.
On the following screen, go to the public_html directory. In some cases, it may have a different name, such as “/” or “root,” “public,” “root_html,” or your website’s name.
public_html contains the root WordPress directory with the three main folders (wp-admin, wp-content, and wp-includes) and the rest of the core files.
Step 4: Check your database name, username, and password in wp-config.php
Before deleting the core WordPress files and database, look at the wp-config.php file. Right-click it and select View or Edit to access its contents. Now look for the lines that contain the username and password associated with your website’s database:
For your database name, search for a line that looks like this:
For your username, search for a line that looks like this:
And for the corresponding password, search for a line that looks like this:
Take note of your database name and corresponding username and password. You’ll need it when deleting your database.
Step 5: Delete the WordPress database and associated username
Let’s first delete the database. Return to the main cPanel dashboard and click MySQL Databases in the Databases section.
On the following screen, scroll down to the Current Databases section. You’ll see a list of active databases. Find the database associated with the site you’re trying to delete and click on the Delete button on the right side.
Now repeat the process for the username associated with that database. Scroll down to the Current Users section, find the username you took note of in the previous step, and delete it.
Step 6: Delete the WordPress core files
Now that your database and username are deleted, it’s time to delete the files containing your installation and website content.
Navigate back to your root directory by going to File Manager > public_html. Once there, you can drag your mouse across all files to select them all, or you can select any of them and then select Select All in the command bar at the top. Finally, click Delete.
And that’s it! You’ve successfully uninstalled WordPress using cPanel.
Why would you uninstall WordPress from cPanel?
There are a few reasons why you would uninstall WordPress, such as:
A security crisis. If your website has become compromised to the point that the best course of action is to uninstall it, be more mindful of security features, and restart from a backup. In these cases, using cPanel could be the first step in the process.
You’re migrating your site. While there are other easier and more automated ways to move your website to a different server or web host, it’s possible to migrate manually. When doing so, you may decide to uninstall WordPress using cPanel.
You want to restart from scratch. If you’re going to reboot your site, you may choose to scrap your current site with cPanel before setting up the new one.
You’re closing your site permanently. If you plan to suspend hosting services for your site, you may as well delete everything in it.
Uninstalling your website for the first time can seem daunting, especially if you lack web development experience. However, cPanel is a user-friendly web hosting control panel you can use to manually uninstall your WordPress site by simply following a series of prompts.
This skill will serve you well if you ever want to migrate your site to a new provider, reboot it, close it permanently, or purge it from malicious code before rolling back to a backup (addressing the security issues first).
Whatever the case, this six-step guide will help you achieve your goals.