From Rising Costs to Self-Hosting Websites
In 2018, facing the rising costs of managed hosting for 6 websites on Bluehost, I found myself at a crossroads. While my primary expertise was in Mobile App Development, I had several side projects requiring web hosting. With three WordPress sites and three static PHP-based websites to manage, I needed a cost-effective alternative. A solution that could handle HTTPS requirements without draining my budget. Here is a Mobile Developer’s journey in self-hosting websites and maintaining a server.
Enter Amazon EC2, something I had worked on at work for multiple clients. A choice that would start me on a six-year journey through server setups, configurations, and the realities of self-hosting.
Finding the Solution: From EC2 to Bitnami on Lightsail
Back then, SSL certificates were expensive, and Google’s shift to enforcing HTTPS (around July 2018) meant SSL was non-negotiable. On Bluehost, getting certificates for each site would be costly, especially since these side projects weren’t monetized. In early 2018, I decided to host everything on a DIY Amazon EC2 Linux instance. This would give me control over costs, SSL provisioning, and server setup. I initially launched a vanilla EC2 Linux instance and installed a LAMP (Linux, Apache, MySQL, PHP) stack. Given the setup was manual and tedious, I fairly quickly switched to Bitnami’s LAMP stack for its easier setup. Eventually, after 2 years, and after multiple silly mistakes which would up the bill to $100+ per month, I landed on Amazon Lightsail, where the simplicity of managed instances was a better fit for my needs.
Learning the Ropes: Server Configurations
Setting up a LAMP server on Linux over a SSH Terminal as a Mobile Developer involved a steep learning curve. I wasn’t deeply experienced with web operations, so everything from setting up Apache virtual hosts to redirect the domains to correct ports and directories, to automating SSL renewals with cron jobs for properly self-hosting websites was new to me. I had to become familiar with Linux commands and navigate MySQL databases, all with the help of a trusty Linux cheat sheet. Despite the challenges, I managed to get three WordPress sites and three static sites running securely on SSL for under $25 a month—a huge win compared to managed hosting options.
The Curse of Maintenance
As the years went by, the need for server maintenance grew. Routine updates for PHP, MySQL, and Linux became a constant concern. Without expertise in server management, each upgrade required time and careful attention. Bitnami didn’t support in-place upgrades on Linux, so each major update meant creating a new instance, reconfiguring virtual hosts, setting up cron jobs, and migrating databases. For a Mobile Developer with only limited experience in web, this was a daunting process.
While managing these tasks for six years, I often questioned the wisdom of handling my own server. Yet, everything continued to work, and for a long time, the setup met my needs and kept my cost low.
The Catalyst: Spam Bot Attack in 2024!
In August 2024, my server faced a significant disruption when one of my WordPress sites was hit by a Spam Bot Attack! This impacted not only the site but the entire server. Thankfully I had enough monitoring in place and I was able to control the attack in an hour with no real damage. This event underscored the challenges of self-hosting and made it clear that I needed a more reliable and secure setup. I decided to explore managed options where updates, scaling, and security would be handled by experts, freeing me from the constant worry of maintaining a server.
The Move: Cloudflare Pages and Managed WordPress Hosting
After careful consideration, I converted my static PHP sites to JS/HTML and moved them to Cloudflare Pages, where free SSL made the transition easier. The remaining WordPress sites found a new home on managed hosting, a service far more affordable and accessible today than it was in 2018. While the monthly cost remains under $25, the real benefit has been the peace of mind that comes with managed services. I no longer have to worry about keeping the server running smoothly.
Reflections on Six Years of Self-Hosting
As I bid farewell to my Linux instance, I’m grateful for the experience it provided—deepening my appreciation for the intricacies of web hosting and server management, skills I once approached as mere side tasks. Managing this server taught me resilience, problem-solving, and the real value of managed services. Though I’ll keep my Linux cheat sheet handy, it’s time to move on.
Goodbye, old friend—you’ve served me well!
Links to Managed Services
Hostinger for WordPress managed hosting. Click to visit referral link