WordPress hosting is silly. Serverless WordPress on Vercel, Netlify, or AWS Lambda.
Vercel (recommended) | Netlify | AWS with Serverless Framework |
---|---|---|
npm install && serverless deploy |
✅ Maintaining servers for WordPress can be a pain. Serverless hosting should be less work.
✅ Small WordPress sites shouldn't cost much (or anything) to host. Vercel, Netlify, AWS, & PlanetScale have free tiers.
✅ WordPress plugins and themes save time and should be extensively supported.
✅ Edge caching can give us blazing fast websites.
✅ We can reduce the carbon footprint of WordPress websites.
✅ We can create a helpful community. Share your successes, knowledge, ideas, or struggles in the discussions.
This is currently an experimental project and shouldn't be used when considerable security or stability is required, yet
The easiest way to do this is with PlanetScale which has a free tier to get started. When using PlanetScale, make sure your database's region matches the region that Vercel or Netlify will use. This is usually us-east-1
.
If deploying to AWS with the Serverless Framework for the first time, check the Serverless Framework docs to get up to speed and run serverless deploy
when ready.
wp-config.php
uses these values to connect to the database. The environment variables are:
For more information about creating environment variables, see here for Vercel and here for Netlify. Remember to redeploy your project after updating the environment variables if you update them after initially deploying your project.
/wp
directory. You can add plugins or themes there in their respective directories in wp-content
netlify.toml
or vercel.json
are where we configure /api/index.js
to handle all requestsevent
object in api/index.js. You can also modify the WordPress response
object there.Need help getting ServerlessWP installed? Start a discussion or e-mail Mitch
GNU General Public License v3.0