When it comes to a personal blog or a small website, the go-to choice for web developers is usually a Content Management System (CMS) like WordPress or Drupal. When we look at how the web has evolved over the past decade or two, is we all started with a static web hosting and then moved to a CMS which usually runs on a LAMP (Linux, Apache, MySQL, PHP) server(s). When you look at a CMS hosting such as a blog, it usually is somewhat cheap however, it comes with it’s own fair share of problems. The main aspect of the problem, in my opinion, is Security. You have to make sure your application such as WordPress and all the plugins are updated at all times. This is where a hacker would try and exploit a WordPress site or any of its plugins as soon as a vulnerability is spotted.
The solution is to implement a number of security measures on the website and manage it yourself. This option would be very cost effective, however, it does require a fair bit of technical knowledge. The other option is to go with a fully managed WordPress hosting, where the provider will manage the security aspect of your website. Even though having a fully managed hosting doesn’t usually guarantee your safety because there are other factors such as third-party plugins. If you have a secured LAMP server with the updated WordPress installation, it is still not guaranteed to be secured, because a hacker will find a way through to your website via a poorly corded or outdated third-party plugin. When it comes to choosing the plugins, make sure you ask yourself whether you really need it and keep the plugin-count as low as possible.
Running a LAMP based blog is somewhat changing in the recent time due to the introduction of Amazon Web Service (AWS) introduction to static page hosting. A lot of people have decided to host their blog or less complex sites on Amazon S3 or GitHub pages and pointing their domain towards it. This method is called ServerLess, which means you are not running a server such as a LAMP stack. This offers the user a number of advantages.
This means, the user only need to create the website using any method of their choice and put the files into the folder. There are a number of static content generators such as Hugo and Jekyll. These content generator does do a fantastic job, however, it does require you to have a moderate technical knowledge and a computer to generate a website and transfer it on Amazon S3 or GitHub pages. In my opinion, most of the small websites and blogs I come across do not necessarily need a database backend to support it.
I was always looking for ways to utilize Amazon S3 to host my website, however, due to the following requirement, I was unable to move away from WordPress.
WordPress Familiarity & Other Static Generators
I am very familiar with WordPress and I didn’t want to go to a solution such as Hugo or Jekyll. This is because I have invested time and money on templates such as Thesis Theme and built my website around it. It would have cost me a great deal of time to convert my website into a Hugo theme.
The support for Hugo is not as great in comparison to WordPress. Because of this factor, I did not want to risk changing my blog into Hugo and rollback to WordPress in case I don’t like it in the future.
The main disadvantage of Hugo/Jekyll is that they do not offer any good management platform like WordPress. Each and every time I want to post content on the blog, I will have to write the posts in the markup language and generate it on the computer. Even though this does not bother me to do it every single time, I always thought it is going be a hassle when I had to write a post on an iPad or a mobile device.
I was looking for ways to offload most of the static content of my blog to a CDN yet keep the WordPress management at the same time. I was using a number of CDN/Cache methods via WordPress Plugins. This did work well for me but I always had to keep an eye on security side WordPress, and the constant attacks on my blog.
This is when I came across Shifter, a platform which will let you use WordPress as a Docker container for content generation as an on-demand basis and create static sites. Once you have edited the content, It will power down the WordPress instance and create the static content.
You can see Shifter’s lifecycle below.
Shifter offered a number of features which is very hard to implement with WordPress unless you invest a great deal of time and money.
- Scalability: The website is scaled by Amazon S3 and served by Amazon Cloud Front. On a traditional LAMP server, the load will have a direct impact on performance. In this case, Amazone S3 and Cloud Front will autoscale according to the requests by the end users.
- Security: There are no servers involved and all the files are static, this means the attacker wouldn’t have any medium to launch an attack or gain control of your website.
- Availability: The data is hosted on Amazon AWS with an availability of 99.99%.
- Speed: Speed bottlenecks are caused by WordPress sites hosted on a LAMP server where a database query is made every time a page is requested. When it comes to Shifter, does not rely on a LAMP server, therefore the website is propagated at a greater speed to the end user.
- Version Control: Every time the static site is generated, it gives you specific control over it. This means you will be able to version control each and every site generation. This is very helpful when you want to rollback to a previous version of a website at any point. This is all done via the Shifter control panel.