How can i check individual domains and disk usage?

January 19, 2014 1.1k views
I need to check how much space a website hosted on our server is taking.
1 Answer
If you would like to check on the individual website, you first need to determine a) the root directory of the site and b) if there is any data outside of that directory the site uses. If it is for instance a WordPress site, the size of the website is the sum total of the files in its root directory, associated directories [like when content is linked outside of the default directory] and the database the site uses.

If the site is composed of just static files and does not use a database. Then you can SSH into your droplet, cd to the directory where the site's files are, and run du -h --max-depth=1

This will return the size of the current directory and sub-directories from within.
Have another answer? Share your knowledge.