LargeFS is a product created by WP Engine, designed to store and transfer virtually unlimited amounts of data and integrate it into the familiar WordPress experience.
For more information on what LargeFS is, read our announcement post, Unlimited Storage with WP Engine’s Proprietary LargeFS.
To enable LargeFS, here is a summary of what you will need to do:
- Create an AWS S3 Bucket
- Give WP Engine access to read, write, and list objects in that bucket
- Make the bucket world readable as a static website.
- Provide bucket name to WP Engine by submitting support request and request a *.largefs file from them.
Detailed instruction on each step are below.
Creating A Bucket
To create a bucket, login to your AWS console and choose S3 from the list of services. Once in the S3 console, click the Create Bucket button:
Give the bucket a name, that meets the following criteria:
- The name must be globally unique. Amazon does not allow bucket names to be reused; not even in different accounts.
- The bucket must start with a letter and contain only letters (lowercase only), numbers, and hyphens.
For this example, we chose largefs-fb23d452, but you will need to choose your own. Be sure to use US Standard as the Region. Now click “Create”.
Assigning Permissions To LargeFS
Next we need to assign the required permissions to the bucket, so that LargeFS can begin placing files in the bucket.
Find and select the bucket you just created in the list of buckets. Next, click “Properties” to reveal the bucket properties in the right-hand pane. Click “Permissions” to expand the permissions. You will see some default permissions like the following:
Click the “Add bucket policy” button to open the Bucket Policy Editor. In the bucket policy editor, copy the policy below, which grants the WP Engine LargeFS user rights to read and write objects in your bucket, and replace the placeholder “your-bucket-name” with the bucket you created. Be sure to keep the “/*” while replacing the placeholder.
{
“Version”: “2008-10-17”,
“Statement”: [
{
“Sid”: “AllowLargeFSUploads”,
“Effect”: “Allow”,
“Principal”: {
“AWS”: “arn:aws:iam::902500896138:user/wpengine-largefs”
},
“Action”: [
“s3:ListBucket”,
“s3:GetObject”,
“s3:PutObject”
],
“Resource”: [
“arn:aws:s3:::your-bucket-name”,
“arn:aws:s3:::your-bucket-name/*”
]
},
{
“Sid”:”PublicReadGetObject”,
“Effect”:”Allow”,
“Principal”: “*”,
“Action”:[“s3:GetObject”],
“Resource”:[
“arn:aws:s3:::your-bucket-name/*”
]
}
]
}
Once you have replaced the placeholders with your bucket name, click “Save” in the Policy Editor and then again in the properties pane.
Enabling Static Website Hosting
We need to enable the bucket for static website hosting.
Click the “Static Website Hosting” section in the Properties pane. Choose “Enable website hosting”, specify “index.html” for the Index Document and click “Save”.
Finally, don’t forget to upload the *.largefs file to your bucket.
Sometimes it takes some time for AWS permissions to propagate, so it may take some time before LargeFS can begin uploading content.
Note: Because your LargeFS bucket is world-readable and because WP Engine has access to it, it is important that you do not store any non-public files in the bucket. Best practice is to not store any files in the bucket that are not managed by LargeFS.
Provide Your Bucket Name To WP Engine
All that is left is to provide the bucket name you just created to WP Engine. You can do this by creating a ticket in your User Portal that includes your bucket name. The Support technician will then walk you through the process of validating your S3 bucket with our system.
Once this process is completed, we will start copying over files from your local wp-content/uploads to your new Amazon S3 bucket. Going forward, we will continue to copy over new files uploaded over to S3.