How can I delete a website include the folder etc? I use ubuntu and I have a few domain names on my server.
But how can I delete a “website” from my server?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
First, you should delete the corresponding DNS records so that it’s no longer pointing to your droplet. Once you’ve done that, you can delete the virtualhost configuration file which is usually in /etc/apache2/sites-enabled or /etc/nginx/sites-enabled.
You can then delete the website’s files by running (replace /var/www/website with the actual path to your website’s files):
rm -r /var/www/website
If you have a MySQL database, you’ll probably want to delete it too:
mysql -u mysql_username -p
Enter your MySQL user’s password and you should be logged in to a MySQL prompt (mysql>). Run the following command to delete the website’s database:
DROP DATABASE `database_name`
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.