Like any installation, a WordPress website will sometimes need to be removed. If you are hosting your website with Web Hosting Hub, you do have the option to use Softaculous to remove your WordPress installation, but only if you installed with that same application. The process to manually uninstall WordPress is not difficult, but you will need to have access either an FTP client or the Cpanel File Manager and the Cpanel MySQL database section. The following article will walk you through the process of manually removing a basic WordPress installation.
Removing the WordPress Installation
Before you begin any uninstall or deletion of files, make sure that you have made a backup of your website files in case there is a need to return to the previous state before any changes. For more information go to Creating a Website Backup in your Cpanel.
In order to start the uninstall process, you first need to know the name of the database and user associated to the WordPress installation. Go to How to Locate your WordPress Database Name in order to find the exact steps to determine your database name. When you find the database name, also look in the same file (the wp-config.php file) for the database username. It will be immediately below the database name and it will be labeled "MySQL database username". Once you have this information, record it for later reference and you can begin to delete the WordPress installation.
Removing the WordPress Files
If your WordPress installation was in a specific folder (other than the PUBLIC_HTML), then removing the files would be easy. You simply have to delete the folder containing the WordPress installation files. However, if you need to separate the WordPress installation files from files that you cannot delete, then you will need to identify the WordPress installation files. WordPress.org provides a list and description of each file here: WordPress Files. It would be best to know the names of the folders (and/or files) that you do NOT wish to delete, instead of trying to pick out the many WordPress files that have been installed. Otherwise, you will need to compare the list of WordPress files with the directory of files that make up your WordPress installation.
Here are the steps for deleting the files using the Cpanel File Manager:
- Login to the Cpanel.
- Go to the Files Section and click on File Manager to get to your website files.
- When the File Manager Directory Selection window appears, click on first entry (Home Directory) and then make sure to click on the checkbox to SHOW HIDDEN FILES before clicking on GO at the bottom of the screen.
- Click on the folder containing your WordPress installation files so that the files appear in the right-side window pane of the File Manager.
- Click on SELECT ALL in the top right side of the File Manager to select the files, then click on DELETE in order to delete the files and folders. If your WordPress installation is in a subfolder, please simply delete the folder that contains all of the files. If it is in the PUBLIC_HTML folder you should not delete the folder, especially if there are other installations.
Editing the .HTACCESS file
If you are not deleting all of the files in the installation folder due to another existing installation, then you may need to edit the .HTACCESS file to remove the standard WordPress entry into the .HTACCESS file. You can the find the .HTACCESS file in the root of your WordPress installation folder (Note: the .HTACCESS is a hidden file, so you will need to select SHOW HIDDEN FILES when entering the File Manager to be able to see the file listed in the File Manager). The entry starts with "# BEGIN WordPress" and end with "# END WordPress". Here are a summary of the steps to delete the entry:
- Click on the .HTACCESS file in the File Manager (see How to Edit your .htaccess File for more information).
- While the .HTACESS file is highlighted, click on EDIT or CODE EDITOR at the top of the File Manager to edit the file.
- Find "#Begin WordPress" and delete this entry and the text between it and "#END WordPress".
- Click on SAVE CHANGES in the top right hand corner to save your changes.
Deleting the Database
- Login to the Cpanel (if you have logged out from above).
- Go to the DATABASE section and click on MySQL Databases.
- You will see a list of databases a table. The screenshot at right shows you how it will appear. Note that you can select the user name and delete it by clicking on the red 'X'. To delete the database click on the DELETE DATABASE link in the far right column of the table.
That completes the manual uninstall process for WordPress. Remember that this does not remove any email addresses that may have been associated with the installation.