Removing a WordPress site from cPanel can be a necessary task for various reasons, such as when you’re migrating to a different host, removing a website you no longer need, or reclaiming server space. The process involves multiple steps that require attention to detail, as WordPress sites are comprised of both files and databases. If one of these components is left behind, it could potentially lead to unnecessary usage of your hosting resources.
This guide will walk you through the steps to fully remove a WordPress site from cPanel, ensuring that all files, databases, and associated services are appropriately deleted.
WordPress Site Removal
Before diving into the steps to remove a WordPress site from cPanel, it is essential to understand what is involved in the process. A WordPress site consists of two primary components:
Website Files: These are the actual files that make up the WordPress website, including the core files (wp-admin, wp-content, wp-includes), theme files, plugin files, and uploaded media (images, videos, etc.).
Database: WordPress stores its content, settings, and other information in a database. The database contains all of your posts, pages, comments, and settings that keep your site functioning.
To fully remove your WordPress site, you will need to delete both the website files and the database. Otherwise, traces of your site might remain on your hosting server.
Step-by-Step Guide to Remove a WordPress Site from cPanel
Step 1: Back Up Your WordPress Site
Before you remove anything, it is always advisable to back up your WordPress site. Even if you are certain that you no longer need the site, backups are crucial in case you want to restore it at a later date.
Backup Files: In cPanel, locate the File Manager and go to the public_html folder (or the directory where your WordPress site is located). Select all the files and compress them into a ZIP archive. This ensures that you have a complete backup of your WordPress files, which you can restore at any time.
Backup Database: In cPanel, open phpMyAdmin, locate the database associated with your WordPress site, and export it. This creates a full backup of your database.
Having a backup ensures that you don’t lose any important data or files if you need them in the future.
Step 2: Remove WordPress Website Files
The next step in removing your WordPress site from cPanel is to delete the website files. These files are stored in your hosting server and include everything that makes up the front-end and back-end of your site.
Log in to cPanel: Start by logging into your cPanel account using your credentials.
Access File Manager: From the cPanel dashboard, scroll down to the Files section and click on File Manager.
Navigate to Your WordPress Files: In File Manager, go to the folder where your WordPress website is located, which is usually public_html. If you installed WordPress in a subfolder, find that specific folder.
Delete WordPress Files: Select all the files within your WordPress directory. You can do this by clicking and dragging your mouse over the files or using the Select All option. Once selected, right-click and choose Delete. Confirm that you want to delete these files. These include WordPress core files, themes, plugins, and media files.
At this point, your website’s files have been deleted from the server. If you had any custom or media files, such as images or videos, stored in a separate directory, make sure to delete those as well.
Step 3: Delete the WordPress Database
The next critical step is to remove the WordPress database. WordPress uses a MySQL database to store all content and settings related to your website. Without deleting the database, your site will still exist on the server in a hidden form, which can cause unnecessary data storage and even performance issues.
Access phpMyAdmin: From the cPanel dashboard, locate the Databases section and click on phpMyAdmin.
Select the Database: In phpMyAdmin, you will see a list of all databases associated with your hosting account. Identify the WordPress database for the site you are removing. If you are unsure, you can find the database name by looking in the wp-config.php file, which is located in the root directory of your WordPress site.
Delete the Database: Once you have selected the database, click on the Drop option at the top of the page. This will delete the entire database and all of its contents. Confirm the deletion.
By deleting the database, you ensure that all of your WordPress data, such as posts, pages, and settings, is completely erased from the server.
Step 4: Remove WordPress Cron Jobs (Optional)
If you had scheduled tasks set up using WordPress cron jobs, you should delete these to avoid any unnecessary server load. WordPress uses cron jobs to perform tasks like scheduling posts, checking for updates, and sending emails.
Go to cPanel: Log into your cPanel account.
Access Cron Jobs: In the Advanced section, click on Cron Jobs.
Remove Cron Jobs: If any cron jobs are associated with your WordPress site, they will appear here. Click on the Delete or Remove option next to the relevant cron jobs.
This ensures that no residual tasks are left running in the background, which could potentially affect the performance of your server.
Step 5: Clear DNS Records (Optional)
If you are completely removing your WordPress site and no longer plan to use the domain name, you can clear the DNS records associated with your website. This step may be necessary if you are transferring the domain or no longer want to associate it with your hosting account.
Log in to cPanel: Open your cPanel account.
Access DNS Zone Editor: In the Domains section, click on Zone Editor.
Delete DNS Records: Here, you can delete any DNS records related to your WordPress site. Look for any A Records, CNAME Records, or MX Records that are associated with the domain and remove them.
This step is typically not required unless you are transferring or deleting the domain entirely. It simply helps to ensure that no DNS records remain active.
Step 6: Remove Email Accounts (Optional)
If your WordPress site was associated with email accounts (e.g., [email protected]), you will want to delete those as well.
Log in to cPanel: Access your cPanel account.
Go to Email Accounts: In the Email section, click on Email Accounts.
Delete Email Accounts: Identify any email accounts associated with your WordPress site and delete them.
This will remove all email data and prevent the email accounts from consuming storage space.
Step 7: Check for Leftover Files and Databases
After deleting the core WordPress files and databases, it’s a good idea to check if there are any leftover files or databases that may have been missed.
Double-Check File Manager: Go back to File Manager in cPanel and ensure that all WordPress files have been deleted. Check other directories where additional files may have been stored.
Double-Check phpMyAdmin: Revisit phpMyAdmin and ensure that the WordPress database is entirely deleted.
Empty the Trash: If you are using File Manager, make sure to empty the Trash folder, as deleted files may still be sitting there and could take up space.
By completing these steps, you can ensure that your WordPress site has been fully removed from cPanel, with no residual files or databases lingering on the server.
Conclusion
Removing a WordPress site from cPanel is a straightforward process if done systematically. It involves deleting the website files, removing the associated database, and ensuring that no leftover files or cron jobs remain active. By following the steps outlined above, you can ensure that your WordPress site is entirely removed from the server, freeing up resources and ensuring that your hosting account is not cluttered with unnecessary data.
It’s important to back up your site before starting the removal process, as this will allow you to restore the site at any point if needed. Whether you’re removing an old site or preparing to migrate to another hosting provider, these steps will help you cleanly and efficiently remove your WordPress site from cPanel.
Related Topics
- When Is functions.php Loaded in WordPress?
- How To Use WordPress On GoDaddy?
- How to Launch Your WordPress Site?