Any recommendations on how we can do server side caching for bitnami wordpress on aws lightsail?

Keywords: WordPress - AWS - How to - Other

I do not see any options on aws lightsail to set up cache. I would prefer server side caching than the plugin route.

Hi @dorishchitson,

Thanks for your message. Our images have PageSpeed (for Apache), and OPCache (for PHP) enabled by default. Apart from those, I think using WordPress plugins are the other option you have. Do you have any other cache option in mind?

I see you have a couple of other topics opened. If all these topics are for the same server, please note it is not recommended to perform many changes for different topics at the same time in the server because it will be difficult to detect which changes are causing the next effects and which not.

how do i know PageSpeed and OPCache are actually working? I also seem to have a fair high TTFB about 200ms and 700ms-1sec if accessed from say australia or singapore.

Hi @dorishchitson,

Thanks for your message. I see in another thread that the bnsupport tool detected issues with PageSpeed and we suggested you to disable it. It is known to cause issues sometimes with small machines having a small amount of memory. About OPCache, it should be working if it is enabled in the php.ini file. Default status is enabled.

Regarding the time to first bit, can you tell us in which region is your server? Maybe Australia and Singapore are too far away from your server and having slightly high values for this parameter may happen.

What do you mean by small machine? i have 4GB of RAM in my lightsail instance, isn’t that sufficient? And i did want to be able to use pagespeed if it actually helped compress images. is pagespeed impacting my TTFB? my machine is in Ohio AWS and it’s 200ms for NYC. isn’t that kinda high?

Hi @dorishchitson,

Thanks for the info. 4 GB is a very good amount of memory for small/medium sites in my opinion, but it also depends on the type of content your website offers (it isn’t the same to offer only text based pages that a lot of images and videos), the number of plugins, the theme requirements and the number of visits your server has at a specific moment.

Regarding PageSpeed and the TTFB measurement, take into account that websites that are sent compressed don’t send their first byte until the compression process has finished, which may increase the TTFB value, but the page will load much faster and be ready for the user in a much smaller amount of time. The compression/TTFB is a tradeoff you need to balance. Apart from that, 200ms seems like a reasonable value to me (although I don’t know what’s your website).

Also, another bottleneck you may find using compression, is that AWS Ligthsail are, as far as I know, burstable instances, which doesn’t perform in a regular manner at all time. It assigns your server a number of CPU credits that will be used to perform high-CPU demanding processes, and depending on your usage and the number of credits you have, it will allow your instance to use the high-CPU performance for a shorter or longer period. Notice this may affect your website compression times, and therefore the TTFB, if you run out of CPU credits.

You can get more information about burstable instances in the next links

Hi thanks for this helpful info. Which also again circles back to if i have sufficient RAM i don’t understand why pagespeed is not doing any compression. I inspect the images on my website and none of them are being compressed. So now i turned it off. I had been asking several times why pagespeed stopped working as soon as i had my SSL turned on and been told it could be memory. I use a very efficient theme and minimal plugins.

Hi @dorishchitson,

Thanks for your message. As you have another thread regarding the PageSpeed issues, we will continue working with you there. I don’t know if SSL certificates have something to do with your PageSpeed issues, but I think it shouldn’t