- August 17, 2023
- Comments Disabled
Apparently WordPress was exhausting my current webhost, which made me want to try and migrate my brand new website to AWS, using their EC2 service.
So now I got a micro AWS Linux instance up and running, and are currently moving the WordPress assets/files, and setting up nginx on the node.
Hopefully it will be pretty straight forward, and the change the DNS to the new IP.
I’m using Cloudflare as CDN and proxy.
Update / Part 2:
As I decided to do everything myself, for only gods know why? I had to create a selfsigned certificate to make sure the website supported SSL. I was doing this using certbot. So now everything is end-to-end encrypted:
Enduser <-> Cloudflare <-> nginx
I also discovered that the typical .htaccess file that Apache uses for redirects and regex stuff simply does not work with nginx
This lead to me researching how to solve it then, and ended up finding the solution here. Where I had to instruct nginx how to treat the URLs, else it simply would do a 404 Not Found error on non-index pages.
As I thought I was done; me slowly starting to smile browsing the site and polishing some stuff. I then discovered that the memory consumption was pretty crazy, which *maybe* explains why my prior host got exhausted? Disabling some plugins lowered the consumption a bit, but not to a point where it was satisfying. But at the moment I won’t bother trying to min-max this.
htop on the linux node
Update / Part 3:
The memory consumption actually kind of annoyed me, like how the f*** can a small website of this size consume that much memory?!
So I decided to spent the late evening hours to dig into it. I found this article / blog post and following the quick steps by modifing the php-fpm config, drasticly reduced the memory consumption – even with multiple clients browsing the site simoustaneously! Wuhu \o/
I now consider my new personal site as stable, secure and rapid fast! 😎