Building a WordPress Environment: The Vision & Planning Phase

English

March 27, 2022: Time to build a web server! I suppose it's a rite of passage for many tech enthusiasts. I recently launched a web server using WordPress on AWS EC2, and this post will be the first in a series documenting the journey. Essentially, this is just a personal memo for my hobbies, but I'd be thrilled if it ends up helping someone else out, even just a little.

■ The Reason


My FC2 blog, "I Want to Go Fishing Even in My Roadster," just won't get approved for Google AdSense.
Because my address verification straddled a house move and I left it sitting there, my Google AdSense application was rejected.
The existing content is way too massive to overhaul everything to meet their approval standards, so I want to start fresh, write about 8 articles, and hopefully breeze through the screening process this time.
Plus, I want to write about topics other than just fishing and cars.

Topics I Want to Write About

  • My fresh impressions of experiencing Apple's ecosystem, especially right now using the iPad mini.
  • Minecraft and running a Minecraft server.
  • Plastic models—Gunpla in particular—and my thoughts on Gundam.
  • Guitars and electronic DIY projects.
  • Servers like AWS, and Linux.

I have diverse hobbies and want to leave behind a digital scrapbook of various things. I've always loved writing and plan to keep at it.

*I probably need to make an effort to format this kind of stuff to make it more readable. Also, I tend to write casually in a colloquial style, so I need to keep a level of quality suitable for public viewing in mind. I'll figure this out as I go.

■ The Plan


・Choosing the Server
Initially, I started thinking about how I could break even on costs after the free tier of my AWS EC2 Minecraft server ended by using a blog and Google AdSense, so I'm sticking with the AWS Minecraft server setup.

However, AWS EC2 doesn't seem ideal for a personal site intended for AdSense.
You get charged based on traffic, which makes costs unpredictable. Because of that, you have to defend against DDoS attacks yourself.
Cost-wise, paid blogging platforms are generally best and require zero maintenance.
That said, I get to use Amazon's world-class servers! Plus, it's free on the trial for a year. Cloud servers also seem fascinating and really tickle my thirst for knowledge, so I've decided to give AWS a shot first.

As for the Minecraft server mentioned earlier, I could run it on my daily-driver PC, a ThinkPad, but keeping the power on 24/7 costs money—though I'll write a separate post introducing that topic later—so I somehow want to keep it hosted on an external server.
I also want to make it easy to share connection info with friends and handle maintenance operations!

・Server Configuration
Even if I run AdSense, I probably won't put in an insane amount of effort, so to go from the red to breaking even, I'm aiming for the absolute lowest cost. Ideally a t2.nano, though the free tier only covers the next step up, t2.micro.
To cut costs, I also want to run on as little storage as possible.
Should I use S3 just for single files or images? Based on my experiments so far, S3 is cheap storage-wise, but since you get charged per request, is it a bad fit for a website?
Even for images, 1GB a year should be plenty. So, I won't use S3 for now. -> Addendum: This can be resolved by using CloudFront.

・My Skill Set
I've been familiar with university UNIX systems since my college days, using Sun SPARC OS and NeXTSTEP. At home, my environment was UNIX-based with the X68000 and FreeBSD. Even when forced to use Windows upon entering the corporate world, I immediately installed Cygwin, catch myself typing "ls" in the DOS prompt, and can only use Emacs as an editor.
Currently, I'm writing this on Ubuntu—I'm a UNIX person through and through.
That said, I'm not an expert; I've only used it for client purposes and network servers, never really touching server-side infrastructure. I don't even know how to use vi.
A while ago, I wanted to play Minecraft with my daughter so we could play even when one of us wasn't around. When I looked into it, I found out Amazon's cloud—AWS—is free for a year, so I launched a Minecraft server on Ubuntu, which I was already comfortable with.
Later, driven by professional curiosity, I took a self-study company training course on Udemy and did some hands-on exercises building a full-spec AWS web server.

・Researching Necessary Software

  • Apache2 … The famous and seemingly only(?) web server.
  • WordPress … The rumored popular web tool, though I don't fully understand it yet.
  • PHP … WordPress is written in PHP.
  • MySQL or MariaDB … WordPress requires a database. I don't really get this part. Websites just link images directly inside HTML, so what does a database have to do with making searches fast?

*The difference between MySQL and MariaDB
"MariaDB is a relatively recent fork of the MySQL project.
MySQL is owned and distributed by Oracle. MariaDB is completely open-source."
Ugh, Oracle gave us a hard time with Java too. Open-source is undefeated. MariaDB it is.

My main concern is how much storage space these software packages will consume.
They're just server programs, so each should only take about 20MB or so.
Databases are still a mystery to me.
I'll check disk usage with the `df` command every time I install a new piece of software.
Storage is already getting tight thanks to Minecraft backups.
If I look like I'm running out, I'll just scale it up bit by bit.
Being able to scale incrementally is the beauty of AWS!

・The Domain
I want a cool-sounding name, but...
For this experiment, I'll start by using the domain I already created and own: the-world-star.com.
I need to decide this quickly so that the accumulation of search index assets can begin once the site goes live.
Actually, I've grown quite fond of this name and it feels just right.
One thing that bothers me is that people say it's better to avoid hyphens in domain names, as they can be hard to type. But even well-known brands like So-net use them.
Besides, people rarely type out URLs directly these days anyway.

Continue reading in the next article.

Setting Up a WordPress Environment: Implementation Guide

■ Implementation Phase - 2022/03/27 Picking up where we left off, it's time to actually set up the WordPress environment. Check out the previous article here. …

Leave a Reply