If you host your WordPress website on DigitalOcean, there might be a time you need to migrate to another server or just simply delete the whole website. Here is the guide.
1. Log into your server via SSH
2. Delete MySQL user and database
Connect to MySQL server
mysql -u mysql_username -p
Run the following commands to find database name, username and delete them
DROP Database your_database_name;
SELECT User FROM mysql.user;
DROP USER [email protected];
3. Delete WordPress Folder
sudo rm -r WordPress_folder_name
Make sure to back up this folder if you migrate your website to another server.
4. Remove domain in Digital Ocean
Navigate to Networking -> Domains to delete your domain name
5. Delete the virtualhost configuration file
sudo rm your_virtualhost_file
All set. Your website is completely removed from your DigitalOcean account now.
Leave a comment below if you have any question following the process.
Disclosure: As an Amazon Associate, I earn from qualifying purchases. The commission help keep the rest of my content free, so thank you!