Serverless WordPress on Vercel, Netlify, or AWS Lambda.
World class affordable (free) hosting for your WordPress blog, portfolio or anything you can imagine.
Netlify | Vercel |
---|---|
- Deploy this repository to Vercel or Netlify. The links above will get you started.
- Setup a MySQL database for WordPress to use. PlanetScale is a great option with a free tier.
- Update environment variables for your project in Vercel or Netlify with the database credentials. These are used by wp-config.php. The environment variables are:
DATABASE
USERNAME
PASSWORD
HOST
- (optional) File and media uploads can be enabled using the included WP Offload Media Lite for Amazon S3 plugin. S3 setup details can be found here. The wp-config.php file is setup to use the following environment variables for use by the plugin:
S3_KEY_ID
S3_ACCESS_KEY
- Install and setup the serverless framework (docs)
- Run
serverless deploy
to confirm that the Lambda is created - Like step 2 above, create a MySQL database and update the environment variables. They can be updated in the
serverless.yml
file and then runserverless deploy
again.
- WordPress and its files are in the
/wp
directory. You can add plugins or themes there in their respective directories inwp-content
netlify.toml
orvercel.json
are what directs all requests to be served by the file inapi/index.js
GNU General Public License v3.0