Wordpress vs JAMstack
Table of Content
WordPress remains champion of content management, with power usage of approximately 35% of the internet.
In its launch in 2004, it started as a purely blogging platform. Nowadays, it’s a multi-purpose website creator, supported by a huge ecosystem of themes and plugins. It is the de facto choice for many website owners, since it’s inexpensive and easy to handle without coding knowledge.
The JAMstack alternative
The main difference between JAMstack and traditional technologies (like WordPress) is that JAMstack doesn’t rely on a server. Instead of linking to a database, and building on server requests, JAMstack sites are pre-built and serverless. A CDM (Content Distribution Network) creates and then sends out the static files. Server-like functionalities come from third-party services via APIs. To make creating a site with JAMstack easier, static web generators are algo emerging. With a SSG, like Gatsby or Hugo, a developer can quickly spin up a basic website.
Decoupled Content Management
JAMstack sites have lots of ways to manage content, including headless CMS (Content Management Systems). A headless CMS allows users to easily add content from an admin panel. You can send the content to the source code’s repository, or store it in a cloud platform service. This is related to the CMS type, but you can read more about it here.
A static site can get data lying in a server via an API. The management of how the data displays, depends entirely on the frontend.
Differences Between JAMstack and WordPress
Let’s take a look at comparisons between the structure of a Gatsby and a WordPress site.
Benefits of a JAMstack site over WordPress
Besides being the new shiny thing in web dev, there are other reasons why JAMstack has an increasingly popular approach. For a start, it solves many pain points both to website owners and developers. These include being faster, cheaper, easier to scale and safer.
JAMstack sites load fast. You can store routing libraries that make links appear instantly, which provides an awesome user experience. Furthermore, it’s a desirable advantage when it comes to speed being so important for search engines.
The way of building and deploying sites is what makes them so fast. Rather than connections via requests to a server, they have pre-building and serving over a CDN. Traditional site builders can use CDNs too, but to store cache static content, like images and documents. It’s much faster when the whole site is served via CDN.
Hosting static files is cheap, and it’s often even free for smaller sites. Scaling is way easier, too. In traditional sites, spikes in traffic can slow down the server, or even make it crash. With a CDN, it’s easier to scale up to meet users’ demands.
Better Dev Experience
It’s convenient that the site's code is stored in a repository like Git, instead of a server. The repository keeps track of changes, and allows you to revert to previous versions. Furthermore, if other developers have to collaborate, they can pull the code from Git onto their local environment. This means that there’s no need for complex installations.
Since JAMstack sites don’t have dynamic interactions with a server, they are less prone to attacks. You don’t have to worry about the server or database vulnerabilities. On the other hand, WordPress sites require frequent updates to be a step forward of security vulnerabilities. If you don’t pay attention to this, your site is open to malicious attacks.
Limitations of a JAMstack site
Beyond its coolness, in many cases, JAMstack may not be the right choice for a project.
Reliance on Development
Using WordPress, you don’t need technical knowledge to make a website quickly. Most style changes can be made straight from the dashboard, through the theme editor. For extra customization, beyond what themes offer, there’s usually a plugin to fix a problem or add a function. If not, the amount of documentation in WordPress communities allows non-technical people to solve problems. With the right themes and plugins, anyone can have a professional and functioning web in the short term on WordPress.
More Static than Dynamic
JAMstack isn’t good for highly dynamic sites. This includes sites with constant updates or lots of user interactions. The JAMstack ecosystem is improving its capabilities, but it’s not quite there yet. One of the main reasons is build time. If you make a change to the site’s code or content, you’ll trigger a rebuild. With a large site, this could take up to 15 minutes. This can be annoying when making small updates or corrections.
Static hosting services typically charge based on build minutes. So, making frequent updates will quickly use up your minutes, unless you have a generous plan. Fortunately, there are ways to cache pages to help speed up build time. It’s only a problem if there’s a lot of content updated frequently.
Optimized WordPress sites can be really fast
There are a lot of guides with excellent ways of speeding WordPress sites. If you follow the rules (a CDN, a lightweight theme, image optimization) a WordPress site can be very fast.
WordPress gets a bad reputation in terms of speed, due to bad practices from some users. Sometimes, unwittingly, they build sites burdened with unnecessary plugins and large image files. Since the barrier to access is low, not everyone on WordPress has knowledge or experience with site optimization.
However, WordPress is still the best choice in many cases. This is seen when your team is mostly non-technical, and you don’t have the budget for a custom site. Good thing is that, with attention to optimization, it’s possible to achieve a fast and secure WordPress site.