0.3.0 • Published 9 months ago
serverlesswp v0.3.0
ServerlessWP
Serverless PHP on AWS Lambda, Vercel or Netlify
Just want to get started with WordPress?
Try the WordPress starter project!
| Netlify | Vercel |
|---|---|
Overview
This is the library that powers ServerlessWP but it can also be used standalone to execute PHP in Lambda functions.
ServerlessWP includes PHP 8.1 with common extensions and libraries required by WordPress to run in the serverless function Node.js runtimes of Vercel and Netlify.
Usage
npm i serverlesswpThen in your project's function directory use the ServerlessWP library in a file like api/index.js:
const path = require('path');
const serverlesswp = require('serverlesswp');
exports.handler = async function (event, context, callback) {
const pathToWP = path.join(process.cwd(), 'wp');
return await serverlesswp({docRoot: pathToWP, event: event});
}Where
- docRoot is the path to WordPress files
- event is the serverless event data from Vercel or Netlify
License
MIT
0.1.3-canary5
10 months ago
0.1.3-canary6
10 months ago
0.1.3-canary
10 months ago
0.1.3-canary2
10 months ago
0.1.3-canary3
10 months ago
0.1.3-canary4
10 months ago
0.3.0
9 months ago
0.2.0
10 months ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.1-canary2
2 years ago
0.1.1-canary
2 years ago
0.1.0
2 years ago