Most content management systems rely on a database to store content and changes to content. When a visitor loads a page, code fetches the content from the database and displays it to the user. These systems can be prone to malicious attacks via SQL injection and other techniques that target database-backed sites. They can also be difficult to scale, requiring tuning of both database and web server stacks.
Static websites don’t need a database because the files produced are just plain old HTML. This has an advantage over database-backed sites in that there is no processing happening on the server–all of those requests to the database can add up to latency and a degraded user experience.
Traditionally hosted websites can be difficult to scale and maintain, while custom CMS’ don’t address scalability.
Serverless cloud infrastructure, such as AWS, provides highly scalable, secure, and lower cost content publishing solutions.
AWS Managed Services, Headless WP.
Of the top 100,000 websites use WordPress
GraphQL to query WP API
The most common solution for querying the WordPress REST API is GraphQL which is conveniently shipped with Gatsby out of the box. With some configuration and the installation of a single WordPress plugin we’re able to create pages and pull data from the WordPress backend using a simple GraphQL schema. All these systems come together to build and deploy new versions of the static site when users save changes within WordPress.