WordPress, just like any other modern CMS consist not only of files. There are also databases, redirection rules, hidden settings and many other things. Hence, deleting WordPress is not exactly as easy as Ctrl+A>Delete>Enter.
If you had installed WordPress through the Softaculous autoinstaller — read How to delete WordPress via Softaculous. If you had installed it manually — follow this manual.
ВАЖНО: You cannot undo the website’s uninstallation, so we strongly recommend you to make a backup.
Deleting the files
All the contents of the WordPress website are kept in the database, while files keep only technical information. The exception to the rule are the mediafiles, which are saved in wp-content/uploads.
In order to delete the WordPress files:
- Log into cPanel.
- Click File manager.
- Click Settings.
- Check the mark Show hidden files.
- Click Save.
- Open the public_html folder by clicking it twice.
- If you want to delete absolutely everything from your hosting, including the files that are not the part of the WordPress — click Select All, click Delete and confirm the operation.
- If you want to keep the files that are not related to your WordPress website, you’ll have to carefully delete only the WordPress files. A complete list of files that are safe to delete can be found at WordPress Codex.
.htaccess keeps the information about the rights to access folders, redirects and other hidden settings of your website.
IMPORTANT: You won’t have to edit .htaccess if you prompted to delete everything from public_html.
- In public_html folder, click on .htaccess
- Click Edit.
- Delete everything between the lines # BEGIN WordPress and # END WordPress.
- Click Save changes.
Deleting the database
Database keeps information about posts, users, comments and custom website’s settings. If the need arises, a wesbite can be restored from the database alone and only the mediafiles will be lost.
In order to delete the database:
- Log into cPanel.
- Click MySQL Databases.
- Click Delete at your WordPress database.
- Click Delete at your WordPress database user.