Community

Where do I view the disk usage of my website?

Ca
Carlos #1

Where do I view the disk usage of my website? I’m having a problem, my website uses 37 GB of disk space so I don’t see where it is, how can I calculate if it’s through ssh or what

Ca
Carlos #3

If I understand that part when I enter the domain files I don’t see the website’s disk usage anywhere, I only see KB

jo
josephgodwinke #4

Kindly post a screenshot

jo
josephgodwinke #6

Now I understand your question. You can check the size of every file in public_html or your Document Root by running this command in ssh terminal:

du -a

or

# tree depth reduced to 1 level
du -d 1

or using blocks

# use a block size of one megabyte
du -m
Ca
Carlos #7

I already executed everything and now what do I do?

Ca
Carlos #9

I explain according to my website that 37 GB is consumed, but my website actually only weighs 5 GB, so where is the other 32 GB? I’m looking and I can’t find anything

jo
josephgodwinke #10

Is this a php website ?

Ca
Carlos #11

is wordpress

Sa
Sangram #12

SSH as root user to your server.

Now to see the files that are using the most disk space/are the largest, use this -

du / -ah | sort -n -r | head -n 20 

Or this -

du /home -ah | sort -n -r | head -n 20

You might wanna try this command in different directories to understand more.

jo
josephgodwinke #13

Clean php sessions by running these commands and reboot your server to see if issue is fixed


# start here copy line bleow me
rm -f /var/lib/lsphp/session/lsphp71/* && rm -f /var/lib/lsphp/session/lsphp72/* && rm -f /var/lib/lsphp/session/lsphp73/* 
# then copy line below me
rm -f /var/lib/lsphp/session/lsphp74/* && rm -f /var/lib/lsphp/session/lsphp80/* && rm -f /var/lib/lsphp/session/lsphp81/*

Ca
Carlos #14

I use php 8.0 Is it the same or what? my question

jo
josephgodwinke #15

Run that command only

Ca
Carlos #16

Screenshot_3

jo
josephgodwinke #17

Do you see if your issue is resolved ?

Sign in to reply