A second WordPress site with EC2 instance

I came across another personal project for friend to migrate a static site to word press site. The original site is on Jekyll + Bootstrap hosted on GitHub. However, the original site does not have a lot of content to justify a special migration effort. So I just create it from scratch.

I outlined how simple it is to host WordPress site in Amazon LightSail in previous posting but being technical myself I’m not always a big fan of third party image. So in this instance i decided to host the environment in T2 micro instance which still falls in free tier of this owner.

We picked an Amazon Linux 2 image which was released in 2018. AWS released a white paper about WordPress best practices but for this pilot site there is no need for high availability or scalability. Some EC2 tutorials are still quite helpful to step you through LAMP configuration and WordPress installation. None of those are new to me.

Since the site’s domain is already purchased, and T2.micro falls within free tier, there is literally no additional cost of migration. This site has its own requirement of oauth authentication using Google identity. Which I will re-visit sometime later.

I also needed a little trick to give transparent image a white background. This is because the site background is black and the transparent area in the foreground image will expose the site background, making diagrams dark and illegible. To do this, add the following section to the additional CSS setting of the active theme:

.post img {
  background-color: rgb(300, 300, 300);
}