Create all required pages/categories/etc, to be found in each plugin’s config/constants.php file (eg: this file), and set those constants with their corresponding ID (there’s an issue to do this through scripts)

Activate all plug-ins and the theme

Required 3rd-party plugins

Install and activate the following plugins, which are integrated with PoP (not all of them are mandatory, however PoP has yet not been tested without them):

Configuration

PoP allows the configuration of the following properties, done in file wp-config.php:

POP_SERVER_USESERVERSIDERENDERING (true|false):
Produce HTML on the server-side for the first-loaded page.

POP_SERVER_USECODESPLITTING (true|false):
Load only the .js and .css that is needed on each page and nothing more.

POP_SERVER_USEPROGRESSIVEBOOTING (true|false):
If doing code splitting, load JS resources on 2 stages: critical ones immediately, and non-critical ones deferred, to lower down the Time to Interactive of the application.

POP_SERVER_GENERATEBUNDLEGROUPFILES and POP_SERVER_GENERATEBUNDLEFILES (true|false):
(Only if doing code-splitting) When executing the /generate-theme/ build script, generate a single bundlegroup and/or a series of bundle files for each page on the website containing all resources it needs.

POP_SERVER_GENERATEBUNDLEFILESONRUNTIME (true|false):
(Only if doing code-splitting) Generate the bundlegroup or bundle files on runtime, so no need to pre-generate these.

POP_SERVER_GENERATELOADINGFRAMERESOURCEMAPPING (true|false):
(Only if doing code-splitting) Pre-generate the mapping listing what resources are needed for each route in the application, created when executing the /generate-theme/ build script.

POP_SERVER_ENQUEUEFILESTYPE (resource|bundle|bundlegroup):
(Only if doing code-splitting) Choose how the initial-page resources are loaded:

“resource”: Load the required resources straight

“bundle”: through a series of bundle files, each of them comprising up to x resources (defined through constant POP_SERVER_BUNDLECHUNKSIZE)

POP_SERVER_TEMPLATEDEFINITION_TYPE (0|1|2):
Allows to replace the name of each module with a base36 number instead, to generate a smaller response (around 40%).

0: Use the original name of each module

1: Use both

2: Use the base36 counter number

POP_SERVER_POP_SERVER_TEMPLATEDEFINITION_CONSTANTOVERTIME (true|false):
When mangling the template names (template definition type is set to 2), use a database of all template definitions, which will be constant over time and shared among different plugins, to avoid errors in the website from accessed pages (localStorage, Service Workers) with an out-of-date configuration.

POP_SERVER_TEMPLATEDEFINITION_USENAMESPACES (true|false):
If the template definition type is set to 2, then we can set namespaces for each plugin, to add before each template definition. It is needed for decentralization, so that different websites can communicate with each other without conflict, mangling all template definitions the same way. (Otherwise, having different plugins activated will alter the mangling counter, and produce different template definitions).

POP_SERVER_USECACHE (true|false):
Create and re-use a cache of the settings of the requested page.

POP_SERVER_COMPACTJSKEYS (true|false):
Common keys from the JSON code sent to the front-end are replaced with a compact string. Output response will be smaller.

POP_SERVER_USELOCALSTORAGE (true|false):
Save special loaded-in-the-background pages in localStorage, to not have to retrieve them again (until software version changes).

POP_SERVER_DISABLEJS (true|false):
Strip the output of all Javascript code.

POP_SERVER_USEGENERATETHEMEOUTPUTFILES (true|false):
Indicates that we are using all the output files produced from running /generate-theme/ in this environment, namely:

resourceloader-bundle-mapping.json

resourceloader-generatedfiles.json

All pop-memory/ files

POP_SERVER_SKIPLOADINGFRAMERESOURCES (true|false):
When generating file resources.js, with the list of resources to dynamically load on the client, do not include those resources initially loaded in the website (through “loading-frame”).

Decentralization: enabling crossdomain

To have a website consume data coming from other domains, crossdomain access must be allowed. For this, edit your .htaccess file like this: