Wordpress Application is consuming too much disk space, what are the best practices and recommendations?

Keywords: WordPress - AWS - Technical issue - Other
Description:
Hello,

I setup an instance in AWS with bitnami Wordpress, however, I’ve been experimenting issues as to disk space.

My Wordpress site is the following www.bomboya.com and it is a simple e-commerce site with no much content. Nonetheless, it is consuming too much disk space and It is being pretty expensive to use as I need to request higher GiB of disk space to AWS.

I would appreciate any help and/or tips as to what impacts directly in the disk space, in order to correct or optimize the matter and run my instance without consuming too much disk space (I’am sure I did something wrong because it consumes much more than expected)

Thanks in advance.

I tried to run the bitnami support tool. I put the command on my putty and accepted the terms and conditions but then it didn’t show me any code. I also read the documentation from https://docs.bitnami.com/general/how-to/understand-bnsupport/ but couldn’t find the solution as to how to process the code for bitnami support. Any help on this issue will also be highly appreciated.

Hi, @danielpulidoayala.

Did you receive any errors when running the support tool? Can you share them?

Regards,
Alejandro

Yes of course.

Not sure what to do next from here.

I will appreciate a lot your help amoreno :slight_smile:

You need to wait for the Support Tool to finish. The line after “Do you accept?” is an indicator of the tool being in progress.

Regards,
Alejandro

I´ve been waiting for more than 4 hours but it never shows anything else.

How long should I keep waiting while running the program?

Try running these commands to see what is using most of your disk space and let me know:

df -ih
df -h
cd /opt/bitnami
sudo find . -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
sudo du -h -d 1

Thanks for your reply. I’ve run the commands in these are the results, from which clearly /dev/xvda1 is causing the problem. I had to increase the disk space of my instance because it stopped running due to disk space limits. However, I am afraid that the application keeps piling up disk space and I would be forced to keep adding disk space to my instance

$ df -ih
Filesystem     Inodes IUsed IFree IUse% Mounted on
udev             122K   322  122K    1% /dev
tmpfs            124K   422  124K    1% /run
/dev/xvda1       2.5M  201K  2.3M    9% /
tmpfs            124K     1  124K    1% /dev/shm
tmpfs            124K     3  124K    1% /run/lock
tmpfs            124K    16  124K    1% /sys/fs/cgroup
/dev/loop0        13K   13K     0  100% /snap/core/9665
/dev/loop1         15    15     0  100% /snap/amazon-ssm-agent/2012
/dev/loop2        13K   13K     0  100% /snap/core/9436
/dev/loop3         15    15     0  100% /snap/amazon-ssm-agent/1566
tmpfs            124K     5  124K    1% /run/user/1000

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M   11M   89M  11% /run
/dev/xvda1       20G  9.6G  9.8G  50% /
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup
/dev/loop0       97M   97M     0 100% /snap/core/9665
/dev/loop1       29M   29M     0 100% /snap/amazon-ssm-agent/2012
/dev/loop2       97M   97M     0 100% /snap/core/9436
/dev/loop3       18M   18M     0 100% /snap/amazon-ssm-agent/1566
tmpfs           100M     0  100M   0% /run/user/1000

$ sudo find . -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
      1 bnsupport-regex.ini
      1 changelog.txt
      1 ctlscript.sh
      1 img
      1 manager-linux-x64.run
      1 properties.ini
      1 README.txt
      1 use_wordpress
      2 bnhelper
      3 bncert
      3 bnsupport
      6 sqlite
      6 stats
      8 config
     14 letsencrypt
     15 var
     23 scripts
     89 licenses
    108 varnish
    476 mysql
    675 php
   4721 common
   6127 apache2
  16365 apps

Hi @danielpulidoayala,

There is one command you didn’t run from the commands that @amoreno shared above, could you please run it?

cd /opt/bitnami
sudo du -h -d 1

Thanks

I just ran it:

$ sudo du -h -d 1
52K ./config
33M ./letsencrypt
116K ./scripts
147M ./apache2
3.0M ./stats
80M ./bncert
86M ./bnsupport
361M ./apps
4.2M ./bnhelper
3.6M ./varnish
3.5M ./sqlite
80M ./php
4.7G ./mysql
1.6M ./licenses
8.0K ./img
92K ./var
145M ./common
5.6G .

According to your last message, MySQL is consuming 4.7GB. Now that you increased your disk, could you try running the Support Tool again? It’s possible that it was failing previously due to lack of space.

Regards,
Alejandro

Yes, Bitnami support tool was run succesfully. Here is the support ticket:

Summary

5bd5d6fc-6a0c-06e5-89cb-93beae176bf9

It looks like you have ~4GB of binary logs. See this post on how to deal with them: Binlogs are Taking Up all my HD Space

Thanks you very much.

My site is unresponsive now. Does the bitnami support tool have to do something? I am freaking out and don’t know why my site is now down.

Hi @danielpulidoayala,

I just got into your Wordpress and it seems to be working, has the problem been solved?

Regards,
Ibone

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.