How To Free Up Disk Space

Hello,
i am currently hosting a single WordPress site on a linode shared cpu 1 core cpu and 1 gb ram with 25 GB ssd storage and my website is using 1018 (MB) disk usage when i check from cyberpanel → manage website but the disk usage on cyberpanel dashboard shows 90% disk usage ?! which is weird dose cyberpanel with Ubuntu 20.04.4 LTS use that much space ? i tried following this article Disk Usage 100% on CyberPanel – How To Free Up Disk Space - BeginNØR which helped a little it drop the usage about 1 or 2 % but in just 1 day or less it get back up to 90% ! is there anything i can do to fix this ?

Install ncdu: sudo apt-get install ncdu -y and with command: ncdu / to see what files take lots of space.

1 Like

show me output of

du -s -h /*

Use your arrow keys to dig deeper that /var. That seems huge for one site server, unless you have huge database

1 Like





first, sorry for the late response and thanks a lot for your time i really appreciate your help.
second i have a single WordPress site which is a job board based on wp job manager plugin with 6k jobs and WordPress database in updraft is 4.7 Mb so is that a lot to require that much MySQL space ? sorry if i am asking stupid question but i am a noob in all this :sweat_smile: so pls be patient with me.

Database look this article of mysqld-bin files. You also can restrict journal file size with command: journalctl --vacuum-size=100M

1 Like

hello,
thanks a lot the article and command you recommended helped cleaning 2.2 GB of journal log but the MySQL is still taking about 9.1 GB for a single WordPress site and you mentioned that this is a lot any idea how fix that ? the article only talking about /var/log/journal

I put wrong article google mysqld-bin files. Those files might be fine to delete but first google how to do it safe way. Just backup everything before you delete anything from database.

You have log-bin service activated in the my.cnf file of mysql and hence its generating log bin of this size. It will keep on creating this log-bin if not removed from my.cnf file.

Edit your mysql my.cnf file and remove the log-bin command from there entirely to stop creating this file. You will need to reboot the server once you edit that file to take effect.

And dont delete those log-bin files directly. There is a safe way to do it which is mentioned in mariadb official site and also many articles on other blogs, do read them and do as directed there. Be careful and take a backup before doing this.