{"id":18648785,"url":"https://github.com/mitchmac/serverlesswp","last_synced_at":"2025-05-15T16:09:41.207Z","repository":{"id":145859187,"uuid":"115159852","full_name":"mitchmac/ServerlessWP","owner":"mitchmac","description":"Host WordPress sites on Vercel, Netlify, or AWS Lambda","archived":false,"fork":false,"pushed_at":"2025-03-03T02:05:12.000Z","size":36013,"stargazers_count":447,"open_issues_count":16,"forks_count":156,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-31T22:14:39.607Z","etag":null,"topics":["lambda","netlify","serverless","vercel","wordpress"],"latest_commit_sha":null,"homepage":"https://serverlesswp.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitchmac.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-23T00:30:26.000Z","updated_at":"2025-03-28T05:52:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"4de7f02d-93cf-426f-a1e2-13247a0bd03a","html_url":"https://github.com/mitchmac/ServerlessWP","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchmac%2FServerlessWP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchmac%2FServerlessWP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchmac%2FServerlessWP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchmac%2FServerlessWP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchmac","download_url":"https://codeload.github.com/mitchmac/ServerlessWP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744293,"owners_count":20988781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lambda","netlify","serverless","vercel","wordpress"],"created_at":"2024-11-07T06:33:49.497Z","updated_at":"2025-04-07T23:03:14.980Z","avatar_url":"https://github.com/mitchmac.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Host WordPress On Vercel, Netlify, or AWS\nWordPress hosting is silly. Serverless WordPress deployed to Vercel, Netlify, or AWS Lambda.\n\n**April 2025 - ServerlessWP now supports SQLite combined with S3 as a truly serverless database alternative!**\n\n## Quick Deploy\n\nChoose one of the following platforms to deploy your serverless WordPress site:\n\n### Vercel (recommended)\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmitchmac%2Fserverlesswp\u0026env=DATABASE,USERNAME,PASSWORD,HOST\u0026envDescription=Database%20credentials%20from%20PlanetScale%20or%20other%20host\u0026envLink=https%3A%2F%2Fgithub.com%2Fmitchmac%2FServerlessWP%23setup-vercel-or-netlify\u0026project-name=serverlesswp\u0026repository-name=serverlesswp)\n\nVercel provides the best experience for ServerlessWP: requests can run for up to 60 seconds, branch-based deployments are automatic and well-supported, and Fluid compute optimizes serverless function resource usage.\n\n### Netlify\n\n[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/mitchmac/serverlesswp)\n\nNetlify is another good option but requests can only run up to 10 seconds. ServerlessWP currently doesn't support branch-based data access with Netlify.\n\n### Serverless Framework \u0026 AWS Lambda\n\n```npm install \u0026\u0026 serverless deploy```\n\n## Project goals\n\n✅ Maintaining servers for WordPress can be a pain. Serverless hosting should make it so much easier.\n\n✅ Small WordPress sites shouldn't cost much (or anything) to host. **Vercel, Netlify, \u0026 AWS have free tiers**.\n\n✅ WordPress plugins and themes are extensively supported.\n\n✅ Blazing fast websites that take advantage of caching and Content Delivery Networks.\n\n✅ Mindful consideration of the carbon footprint of WordPress websites.\n\n✅ Create a helpful community. [Share your successes, knowledge, ideas, or struggles](https://github.com/mitchmac/ServerlessWP/discussions) in the discussions.\n\n## Deploy ServerlessWP\n\n**This is currently an experimental project. It's probably a good fit for personal blogs, documentation sites, and small org or business sites.** It shouldn't be used when considerable security or stability is required, yet\n\n### 1. Deploy this repository to Vercel, Netlify, or AWS.\nOne of the links above will get you started. You'll just need a GitHub account.\n\n### 2. Select a database solution.\nWordPress usually runs with a MySQL or MariaDB database. That means hosting a database that runs 24/7.\n\nA [SQLite database](https://github.com/WordPress/sqlite-database-integration) option has been developed by members of the WordPress community. Combining SQLite with the recent ability to *conditionally write* to S3-compatible object storage allows for decentralized and serverless data layer for ServerlessWP.\n\nServerlessWP supports both SQLite+S3 and MySQL/MariaDB as database options. For blogs and sites that don't receive many simultaneous updates, SQLite+S3 may be a much lower cost and zero maintenance option.\n\nThe main trade-offs of using SQLite+S3 with ServerlessWP are:\n- some plugins may not be completely compatible with SQLite\n- if requests are handled by multiple underlying serverless functions at the same time and make a change to the database, the last request may fail.\n\n### 3. **Update the environment variables.**\nAfter selecting your database solution you'll need to update environment variables for your project with the S3 or database credentials. The WordPress config file ```wp-config.php``` is configured to use these values to connect to the database. \n\nIf using **SQLite and S3**, create a private S3 bucket and get access credentials for these environment variables:\n- SQLITE_S3_BUCKET\n- SQLITE_S3_API_KEY\n- SQLITE_S3_API_SECRET\n- SQLITE_S3_REGION\n- SQLITE_S3_ENDPOINT (optional: use with Cloudflare R2 for example)\n\nIf using a **MySQL or MariaDB** database, setup a database and fill in these variables:\n- DATABASE\n- USERNAME\n- PASSWORD\n- HOST\n\nSee [here for Vercel](https://vercel.com/docs/concepts/projects/environment-variables) and [here for Netlify](https://docs.netlify.com/environment-variables/overview/) for more about managing environment variables. Remember to redeploy your project after updating the environment variables if you update them after initially deploying your project.\n\n### 4. File and media uploads with S3 (optional, can be done later) \nFile and media uploads can be enabled using the included WP Offload Media Lite for Amazon S3 plugin. S3 setup details can be found [here](https://deliciousbrains.com/wp-offload-media/doc/amazon-s3-quick-start-guide/). The wp-config.php file is setup to use the following environment variables for use by the plugin:\n- S3_KEY_ID\n- S3_ACCESS_KEY\n\n## Quick install video\n\n[![](https://markdown-videos.vercel.app/youtube/A1HZB2OqpCY)](https://youtu.be/A1HZB2OqpCY)\n\n## Customizing WordPress\n- WordPress and its files are in the ```/wp``` directory. You can add plugins or themes there in their respective directories in ```wp-content``` then commit the files to your repository so it will re-deploy.\n- Plugins like [Cache-Control](https://wordpress.org/plugins/cache-control/) can enable CDN caching with the s-maxage directive and make your site super fast. Refer to [Vercel Edge Caching](https://vercel.com/docs/concepts/edge-network/caching) or [Netlfiy Cache Headers](https://docs.netlify.com/edge-functions/optional-configuration/#supported-headers)\n\n## Project structure\n- `netlify.toml` or `vercel.json` are where we configure ```/api/index.js``` to handle all requests\n- [mitchmac/serverlesswp-node](https://github.com/mitchmac/serverlesswp-node) is used to run PHP and handle the request\n- You can modify the incoming request through the ```event``` object in api/index.js. You can also modify the WordPress ```response``` object there.\n\n## Getting help\nNeed help getting ServerlessWP installed? [Start a discussion](https://github.com/mitchmac/ServerlessWP/discussions)\n\n## How can you help?\n- Just using ServerlessWP and [reporting any problems you experience](https://github.com/mitchmac/ServerlessWP/issues) is a great way to help.\n- Spread the word! Let's try to make WordPress hosting better.\n\n## License\nGNU General Public License v3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchmac%2Fserverlesswp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchmac%2Fserverlesswp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchmac%2Fserverlesswp/lists"}