Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions util/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,11 @@ exports.validate = function(response) {
dashboardLink = 'https://console.aws.amazon.com/console/home';
}

// @TODO: update text
if (!hasSQL && !hasSqliteS3) {
let message = "<p>It appears that the required environment variables for the WordPress database aren't setup.</p>"
+ "<p>If you don't have a database solution selected yet, there are a few options.</p>"
+ "<p>WordPress usually runs with a MySQL or MariaDB database. That means hosting a database that runs 24/7.</p>"
+ "<p>ServerlessWP now supports SQLite combined with S3 as a truly serverless database alternative. Combining SQLite with the recent ability to conditionally write to S3-compatible object storage allows for a zero maintenance and low cost data layer for ServerlessWP.</p>"
+ "<p>Two trade-offs exist using SQLite and S3 for ServerlessWP: some plugins may not be completely compatible with SQLite and requests might fail if simultaneous requests change the database (within milliseconds of each other).</p>"
+ "<p>So you'll need to create an S3 bucket or a MySQL/MariaDB database.</p>"
+ `<p>Then you'll need to populate the environment variables for your site at Vercel or Netlify (<a href="${dashboardLink}">dashboard</a>)</p>`
+ "<p>The required variables for <strong>SQLite and S3</strong> are:</p>"
+ `<pre><code>
SQLITE_S3_BUCKET
SQLITE_S3_API_KEY
SQLITE_S3_API_SECRET
SQLITE_S3_REGION
SQLITE_S3_ENDPOINT (optional: use with Cloudflare R2 for example)
</code></pre>`
+ "<p>The required variables for <strong>MySQL or MariaDB</strong> are:</p>"
+ `<pre><code>
DATABASE
USERNAME
PASSWORD
HOST
</code></pre>`
+ "<p>Head over to the <a href='https://github.com/mitchmac/ServerlessWP?tab=readme-ov-file#3-update-the-environment-variables' target='_blank'>readme</a> to pick a data option and setup environment variables.</p>"
+ `<p>You'll need to populate the environment variables for your site at Vercel or Netlify (<a href="${dashboardLink}" target="_blank">dashboard</a>)</p>`
+ '<p>Then <strong>remember to redeploy your site at Vercel or Netlify</strong> for the environment variables to be updated for the site.</p>';

return {
Expand Down