Download the PHP package innocode-digital/wp-prerender-aws-lambda without Composer

On this page you can find all versions of the php package innocode-digital/wp-prerender-aws-lambda. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-prerender-aws-lambda

AWS Lambda Prerender

Description

Generates HTML for client-side rendered content via AWS Lambda. This plugin sends request to AWS Lambda Prerender function which renders content with Puppeteer and returns HTML back through REST API callback.

Install

If plugin was installed as regular plugin then activate AWS Lambda Prerender from Plugins page or WP-CLI: wp plugin activate wp-prerender-aws-lambda.

Configuration

Add the following constants to wp-config.php:

`

Create Lambda function on AWS. Expected default name is prerender-production-render but you may use any other. There is a prepared function AWS Lambda Prerender.

Used user should have InvokeFunction in policy.


`

It's possible to change database table name where HTML will be stored and query argument which is using when serverless function makes request to website.

Usage

Plugin automatically generates HTML on Post/Page and Term save action with updating of related content like Frontpage, but it's possible to control this behavior e.g. if you do not want to update author's archive page on post save then use next filter:

`

Also, plugin generates HTML "on the fly" when someone visits any of object with template e.g. single post and if there is no content in database for current object in current version then cron task will be scheduled to make new request to Lambda.

If theme does not support e.g. date archives then it's possible to disable them at all:

`

Also, it's possible to add custom template in addition to existing:

  1. Create new template from Innocode\Prerender\Abstracts\AbstractTemplate class:

`

  1. Implement method stubs in your template class.
  2. Add your template class object to templates collection:

`

By default, plugin uses selector #app to grab content, i.e. that your client-side application is wrapped in block with ID app:

`

If it's needed to change selector use next hook:

`

Notes

Existing templates

Version

It was mentioned above that content has a version, and you may want to upgrade it at some point, most obvious case when something has been changed in client-side rendered layout. In this case it's needed to bump new version:

`

But, you can install Flush Cache Buttons plugin which adds possibility to do this action by clicking on the button in admin panel.

Modify content during prerendering

Sometimes content which is prerendered should be different from what we get on client-side e.g. you may need to exclude certain element. In this case use JavaScript global variable:

`


All versions of wp-prerender-aws-lambda with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-json Version *
aws/aws-sdk-php Version ^3.14
innocode-digital/wp-secrets-manager Version ^1.0
innocode-digital/wp-version Version ^1.0
jaybizzle/crawler-detect Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package innocode-digital/wp-prerender-aws-lambda contains the following files

Loading the files please wait ....