Blog

How to Merge WordPress With Static HTML Files

Backstory

A few months ago I had a genius idea. I could create a personal website with Ruby on Rails and host it on Heroku for free using a Free Plan and a monitor robot to keep the website awake. The only thing I’d have to pay for is a domain name that I could get from Hover with free WhoIs Privacy.

Recently, I got a lot of public attention for a dashboard that I created tracking the Toronto Real Estate Market. This brought more people to my site, but unfortunately caused heroku to decide that my site was disqualified for the free plan and would need to be updated to a hobby developer plan for $7 USD.

Being frugal as always, I started to shop for other options. I knew I’d eventually like to start a blog and although I had a blog on the heroku site, the images were hosted via Amazon S3 and I was paying pennies monthly to keep them up. I’ve had some experience developing custom wordpress sites so I decided to go the shared hosting route with IWFHosting so I could easily install wordpress and have some addon domains/emails for future web development ideas. The total price: $4.91 USD. Guess I couldn’t sustain on the free-99 model forever, but this sure does beat other hosting sites ridiculous monthly pricing.

Problem

So now I have a bunch of static html files of all my individual projects and a wordpress installation that is run on php. I also need a common header nav-bar so that when someone visits my site everything looks fluid. The problem can be broken done into smaller tasks to create my website:

  1. Add in static html files
  2. Hide .html extension when accessing static pages
  3. Make a shared header nav-bar that’s accessible on any webpage of the website

Continue reading