Skip to content

Add S3 instructions to documentation #962

Description

@zaerl

You can add instructions on how to host blueprints, plugins, and themes in a S3 bucket.

Substitute:

  1. __REGION__ with the region you have created the bucket, see the complete list
  2. __BUCKET_NAME__ with the bucket name

In https://s3.console.aws.amazon.com/s3/buckets/__BUCKET__?region=__REGION__&bucketType=general&tab=permissions

A bucket should have this policy:

{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AddPerm",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::__BUCKET_NAME__/*"
        }
    ]
}

CORS instead must be:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "HEAD"
        ],
        "AllowedOrigins": [
            "*" // Here you can put https://playground.wordpress.net/
        ],
        "ExposeHeaders": [],
        "MaxAgeSeconds": 3000
    }
]

An example Blueprint that install a plugin from S3:

{
    "landingPage": "/wp-admin/plugins.php",
    "preferredVersions": {
        "php": "8.2",
        "wp": "latest"
    },
    "steps": [
        {
            "step": "login",
            "username": "admin",
            "password": "password"
        },
        {
            "step": "installPlugin",
            "pluginZipFile": {
                "resource": "url",
                "url": "https://__BUCKE_NAME__.s3.__REGION__.amazonaws.com/your-plugin.zip"
            }
        }
    ]
}

Something like: https://playground.wordpress.net/?blueprint-url=https://6251.s3.eu-west-1.amazonaws.com/fusion.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions