
Template details
ServerlessWP
Open-source template that runs WordPress in serverless functions on Vercel, Netlify, or AWS Lambda, with a SQLite database stored in Vercel Blob or S3.
About this template
ServerlessWP is an open-source deployment template that runs WordPress inside serverless functions on Vercel, Netlify, or AWS Lambda, keeping its SQLite database in Vercel Blob or an S3-compatible bucket instead of a always-on server.
What is ServerlessWP?
ServerlessWP is a GitHub-hosted hosting setup that executes WordPress on demand in serverless functions rather than on a server running around the clock. It takes a site-owned wp/ directory (WordPress core, plugins, themes, mu-plugins) plus environment variables that select a database backend, and produces a live WordPress site served from Vercel, Netlify, or AWS Lambda with CDN delivery and automatic HTTPS. Database selection follows a fixed order: MySQL when all four connection variables are set, then SQLite in S3 when SQLITE_S3_BUCKET is set, then SQLite in Vercel Blob when BLOB_STORE_ID, SQLITE_BLOB_STORE_ID, or SQLITE_BLOB_READ_WRITE_TOKEN is set, otherwise the setup page appears. Runtime behavior lives in the serverlesswp-node npm package, which api/index.js imports; routing is configured in vercel.json or netlify.toml. The project is maintained by mitchmac and licensed under GPL v3.
What makes ServerlessWP stand out?
- One-click Vercel deploy — the deploy button provisions a private Vercel Blob store used for both the SQLite database and media uploads, so no separate database host or credentials need copying.
- Branch previews — on Vercel, each new git branch starts with its own fresh SQLite database, configured automatically.
- Pull-request WordPress updates — a daily Update WordPress GitHub Action replaces core files verified against wordpress.org checksums and opens a PR; skipped or modified core files are listed.
- Separate plugin update PRs — bundled plugins update only when the entire installed release matches wordpress.org checksums; modified, premium, and custom plugins are skipped and reported.
- Object-storage media via stream wrapper — set
SERVERLESSWP_STREAM_PROVIDERtovercel-blobors3; private uploads are served through the function and cached at the edge, and.php,.log,.sqlite, and.htaccessfiles are never routed. - CDN caching controls — cache headers such as
s-maxageenable edge caching (Vercel Edge Caching or Netlify cache headers), with a default served-file header ofpublic, max-age=3600, s-maxage=86400. - MySQL option — set
DATABASE,USERNAME,PASSWORD, andHOST(plus an optionalTABLE_PREFIX) andwp-config.phpconnects automatically; TiDB is named as one hosted option. - Dry-run update checks —
npm run wp:update -- --dry-run,--plugins --dry-run, and--themesreport available updates without changing files.
Who should use ServerlessWP?
- Bloggers, portfolio owners, and small business sites: publish posts and pages through the familiar WordPress admin while paying for on-demand compute instead of a 24/7 server.
- Developers running dev or staging environments: use per-branch SQLite databases on Vercel to test theme and plugin changes in isolation.
- Teams shipping documentation or marketing sites: keep WordPress authoring while leaning on CDN caching and edge delivery for mostly-static traffic.
- Sites with heavy editorial or transactional load: these should not use the SQLite path — multiple active editors, frequent form submissions, ecommerce, membership sites, and forums are directed to the MySQL/MariaDB option.
Use cases
- Personal blog or portfolio: deploy the Vercel button, finish the WordPress setup screen, and write posts with media stored in the private Blob store.
- Staging and preview environments: let every git branch spin up its own SQLite database so changes can be reviewed before merging.
- Low-traffic marketing or docs site: add
s-maxagecache headers so WordPress renders rarely and the CDN serves most requests. - Plugin or theme development: commit files into
wp/wp-content/plugins/orwp/wp-content/themes/and push to redeploy on the serverless host.
How does ServerlessWP work?
- Deploy from the Vercel button (leaving the two pre-filled settings,
SERVERLESSWP_STREAM_PROVIDER=vercel-blobandSERVERLESSWP_STREAM_VERCEL_ACCESS=private, unchanged to enable media uploads), or use Netlify's start link, or runnpm install && serverless deployfor AWS Lambda with the Serverless Framework. - Vercel provisions a connected private Blob store and supplies the store ID and OIDC authentication; a new branch receives its own fresh SQLite database.
- Open the deployed site URL and complete the standard WordPress setup, then write posts and upload media; framework code updates come from the
serverlesswpnpm dependency, whilewp-config.phpstays entirely site-owned.
Pros and cons
- No server to manage and no separate database hosting; the framework ships as an npm dependency and updates arrive as reviewable pull requests.
- Compute runs only when requests need it, and media persists in S3 or Vercel Blob because local writes do not survive redeploys.
- ServerlessWP is explicitly an experimental project; SQLite is incompatible with some plugins and competing database writes can fail.
- Themes receive no automatic updates — wordpress.org provides no theme checksums, so updates are only reported for manual installation.
- GitHub disables scheduled workflows after 60 days without a push, and Vercel's free Hobby plan is limited to personal, non-commercial projects.
Pricing
ServerlessWP itself is free and open source under GPL v3; only your hosting provider's plan costs apply. Vercel's free Hobby plan covers personal, non-commercial projects, and features and usage limits vary by plan, while Netlify and AWS Lambda are supported alternatives with their own billing.
Alternatives
- WP Engine and Kinsta — managed WordPress hosts that run on persistent managed infrastructure rather than serverless functions.
- WordPress.com — a hosted WordPress service with its own plan structure rather than a deploy-your-own repository.
FAQ
Is ServerlessWP free?
Yes. ServerlessWP is open-source software released under GPL v3, so there is no license fee. Costs come from the hosting platform you deploy to, and Vercel's free Hobby plan is restricted to personal, non-commercial projects.
What databases can ServerlessWP use?
It supports MySQL/MariaDB and a SQLite database stored in Vercel Blob or an S3-compatible bucket such as Cloudflare R2. MySQL takes precedence when all four connection variables are set, followed by SQLite in S3, then SQLite in Vercel Blob.
Can I use any WordPress plugin with ServerlessWP?
No. The project states that some plugins are incompatible with SQLite, and competing database writes can fail. For multiple active editors, frequent form submissions, ecommerce, membership sites, or forums, the documentation recommends switching to the MySQL/MariaDB option.
Where are media uploads stored?
Uploads and supported plugin-generated files persist in S3 or Vercel Blob through the stream wrapper, because local file writes do not survive redeploys. Private uploads are served through the function and cached at the edge; plugins, themes, mu-plugins, and language files stay local.
Can ServerlessWP run outside Vercel?
Yes. Netlify deployment lets you bring your own SQLite plus S3 or MySQL database, and AWS Lambda deployment uses the Serverless Framework. Vercel also supports an S3 demo database that expires after a few days for testing.
















