Build a headless WordPress site using Next.js or Astro for the frontend while WordPress manages content in the background.
Query specific WordPress posts, pages, and custom fields in a single API request without over-fetching data.
Add network-level caching to WordPress content queries using the Smart Cache plugin extension.
Register custom fields and connections to the GraphQL schema using standard PHP functions.
| wp-graphql/wp-graphql | piwigo/piwigo | lazychaser/laravel-nestedset | |
|---|---|---|---|
| Stars | 3,778 | 3,788 | 3,796 |
| Language | PHP | PHP | PHP |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 3/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing WordPress installation, install the plugin from WordPress.org and the GraphQL API is immediately available.
WPGraphQL is a free WordPress plugin that adds a GraphQL API to any WordPress site. GraphQL is a way of querying data where you describe exactly which fields you want and receive only those fields in a single response, rather than getting a fixed set of data from multiple separate requests. Installing this plugin exposes all of your WordPress content through that kind of API. This opens the door to building what is commonly called a headless WordPress setup: WordPress runs in the background managing content (posts, pages, users, menus, taxonomies, custom post types), while the front-end of the website is built with a separate framework of your choice. Next.js, Svelte, and Astro are mentioned as examples. The WordPress admin stays familiar for editors, but the public-facing site is built independently and fetches its data from WPGraphQL. The schema covers the full range of core WordPress data. Extension plugins expand it further: WPGraphQL for ACF adds support for Advanced Custom Fields, and WPGraphQL Smart Cache adds network-level caching and automatic cache invalidation so repeated queries do not hit the database each time. Developers can also register their own fields and connections to the schema using built-in WordPress-style PHP functions. The repository is organized as a monorepo containing the core plugin, the IDE extension, the Smart Cache plugin, and the ACF integration, along with the source for the wpgraphql.com documentation site. For anyone just installing the plugin, none of that structure matters: you install it from WordPress.org, activate it, and the API is immediately available. A built-in GraphiQL browser interface lets you explore and test queries directly from the WordPress admin panel. Documentation, a Discord community, and a live demo environment are all linked from the project website.
A free WordPress plugin that adds a GraphQL API to your site, letting you build modern headless frontends with Next.js, Svelte, or Astro while keeping the familiar WordPress admin for content editors.
Mainly PHP. The stack also includes PHP, WordPress, GraphQL.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.