Static websites are making a major comeback right now, perhaps as a reaction to the slow, bloated PHP frameworks that run large portions of the web today. The speed, security, and scalability of these sites, often available at a lower cost, are some of the most compelling reasons developers find themselves joining the rapidly growing JAMstack community. It also provides a git and CLI-friendly development workflow and allows developers to easily experiment with the latest frontend technologies, without prescribing any specific frameworks or tools.
Most JAMstack sites are built using Jekyll, Hugo, Nuxt, Next, Gatsby, or another static site generator. The generated markup and assets are often served via a CDN for near instant page loads.
Netlify pioneered JAMstack hosting and has inspired the creation of a myriad of tools that enable fast and convenient deployments. Plugins that allow developers source content from WordPress and host it with Netlify are starting to pop up more frequently. Netlify’s free tier is one of the main reasons it has grown so quickly in popularity, as it provides a fast way to host a personal site or small project with custom domain support, HTTPS, Git integration, and continuous deployment included.
Tiny Pixel Collective created a plugin called Netlify Deploy that automates Netlify builds on WordPress publish and update events. The company built it to make it easier for developers to rebuild Netlify-hosted Gatsby frontends using WordPress as the publishing tool. It works in the background to keep a static frontend in sync with the post database, rebuilding the site when users make updates to posts and pages. The plugin triggers the Netlify webhook whenever the standard WordPress posttypes post and page undergo a change in publish status, but it can also be modified to work with custom post types and custom publish hooks.
JAMstack Deployments, created by Christopher Geary, a developer and JAMstack aficionado, is a similar WordPress plugin that facilitates deployments to Netlify, as well as other platforms. The plugin’s settings page lets users configure the webhook URL in the admin, and includes options to limit it to trigger on specific post types and taxonomies. JAMstack Deployments is also conveniently available for free on WordPress.org.
Deploy Netlify Webhook is a similar plugin from Luke Secomb that appears to work manually through a “Build” button in the WordPress admin. It has the added benefit of allowing developers to check the status of the latest build to see if it was successful, without having to leave WordPress.
Justin Hall, a plugin author and senior web developer at SendGrid, published his Gatsby + Headless WordPress + Netlify starter skeleton to GitHub. This particular setup requires his LittleBot Netlify plugin to trigger Netlify build hooks on post save or update, with an additional option that allows WordPress users to publish to Staging or Production sites.
WP2Static is a popular plugin that generates static HTML files rom a WordPress site. Users have the option of auto-deploying to a folder on the server, a ZIP file, FTP server, S3, GitHub, Netlify, BunnyCDN, BitBucket, or GitLab. Theh plugin currently has more than 10,000 active installations.
These are just a small sampling of tools that developers are creating to allow WordPress users to retain the capabilities a dynamic publishing platform while building it statically to take advantage of the speed, security, and performance gains.
I used to be afraid I was distracting #WordPress folks by teaching @gatsbyjs.
— Zac Gordon (@zgordon) June 19, 2019
The trend towards using a headless CMS combined with static site generators is a setup that is heavily geared towards developers at the moment. Translating all the jargon for non-technical site and business owners is a new challenge for those looking to sell services for setting up JAMstack architecture.
That’s where more user-friendly hosting platforms like Strattic, Shifter, and HardyPress are making inroads on marketing JAMstack technology to a less-technical crowd. They provide all-in-one “serverless” architecture solutions that generate static files from WordPress sites and serve them via CDN.
One of the chief drawbacks to pursuing a static WordPress setup is that many dynamic capabilities do not work in this environment. Adding contact forms can be a challenge. Sites that require native WordPress comments or anything that is more complex and interactive will not work. This includes functionality offered by WooCommerce, bbPress, BuddyPress, and membership plugins, to name a few examples. For now, the JAMstack fervor is mostly limited to the DIY developer crowd looking to host more simple sites.