Webserver - nolanhergert/notes GitHub Wiki
The Immigrant Story
Cloudways
Migrated to allow me not to have to restart the server again, hopefully.
Need to clean up unused images at some point...or just increase the drive size when we get there.
Caching
Had a caching issue where WP Rocket didn't notify Varnish (server-level cache) that a page had changed, so Varnish didn't know to purge the cache. Using Breeze fixed that, but had various CSS loading/caching issues. So just disabling CSS caching and it shouldn't affect the loading that much (3KB on 30KB or something like that). We'll see.
Backups
Prime Mover, provides unlimited size export and import. Downloading to my laptop and putting on backup drives at the house, unencrypted. Used a different service before, I forget the name. Doing them every 3-6 months.
Cloudways has both an application and a remote backup option of the entire server for free, but it doesn't look like the app backup includes images? (the backups are too small). Basically I don't trust it yet since I haven't actually used it. Not using local backups as they take up 5GB out of 10GB free continually.
Image quality
For whatever reason, the Jetpack image caching/CDN (called Photon) didn't have great image quality. Bumped it up to 90% by adding the below to functions.php: https://theimmigrantstory.org/wp-admin/theme-editor.php?file=functions.php&theme=sydney-child
function jeherve_custom_photon( $args ) {
$args['quality'] = 90;
return $args;
}
add_filter( 'jetpack_photon_pre_args', 'jeherve_custom_photon' );
Dec 11
- Crashed again, this time from someone spamming wp-login.
- Lots of errors from mysql. Was able to repair though?!
The wp_postmeta table is not okay. It is reporting the following error: 28 clients are using or haven't closed the table properly. WordPress will attempt to repair this table…
Successfully repaired the wp_postmeta table.
Watchdog timer for mysql? Really, I'd like a lower ram version. Why does it take so much RAM? Especially if so much of our stuff is cached and not in mysql? Weird.
Digital Ocean's recommendations on load testing tools: https://www.digitalocean.com/community/tutorials/an-introduction-to-load-testing
- They don't recommend turning on swap for SSDs for making them last longer
As proxy for performance improvements apparently.
Currently have WP Rocket set up minifying and combining all CSS and JS files into one. I'm seeing some sequentialness in the responses from the server.
I think HTTP2 might improve this, but the the server barfed using the tutorial here: (in the disabling MPM part) https://www.tecmint.com/enable-http2-in-apache-on-ubuntu/
Results May 2021 on a story page (quite good, 1.5s LCP): https://www.webpagetest.org/result/210512_AiDcFT_3895b115fda455eabf1f2efb7745fc06/