PHPackages                             columbiaroad/wp-ssr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. columbiaroad/wp-ssr

ActiveWordpress-plugin[API Development](/categories/api)

columbiaroad/wp-ssr
===================

Server-side rendering for JavaScript apps inside WordPress templates.

v1.1.4(5y ago)42.0k↓44.4%[9 PRs](https://github.com/ColumbiaRoad/wp-ssr/pulls)PHP

Since Feb 12Pushed 3y ago4 watchersCompare

[ Source](https://github.com/ColumbiaRoad/wp-ssr)[ Packagist](https://packagist.org/packages/columbiaroad/wp-ssr)[ Docs](https://github.com/ColumbiaRoad/wp-ssr)[ RSS](/packages/columbiaroad-wp-ssr/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (8)Dependencies (4)Versions (21)Used By (0)

WordPress SSR
=============

[](#wordpress-ssr)

> Poor man's Server Side Rendering

This application aims to solve server side rendering of JavaScript applications inside WordPress templates. It runs in two parts. First there is the WordPress plugin which creates new post type for the renders and REST API endpoints to get an array of render objects. Secondly there is Express server which when accessed fetches these render objects and launches puppeteer to render the pages. When the page is rendered and the wanted application part of that page is parsed, it will save the html back to the post through the REST API.

Disclaimer
----------

[](#disclaimer)

This application doesn't provide you real time server side rendering but it's suitable for better SEO accessibility for your content. The puppeteer renders the page always as unauthenticated user and it requires that the state changes are reflected in the url.

Setup
-----

[](#setup)

### WordPress

[](#wordpress)

You can install the plugin using composer:

```
composer require "columbiaroad/wp-ssr:0.1.2@dev"
```

First you need to navigate to the plugin settings and fill in the required information. You need to provide an API key to be used for authenticating with the REST API. Then you need to give WordPress the Node application url what to ping for renders. Last you can define the interval when the renders expire.

In the WordPress template you need to request the rendered content before initial render of the header. You can request the content of the application by using `WPSSR\Render::render` method which takes in three parameters:

- `string $url` Url of the page you are requesting to be rendered
- `string $app_selector` Query selector for the application root element
- `string $waitfor_selector` Query selector for the puppeteer to wait before rendering the page

```

```

### Node App

[](#node-app)

To start the Node application you need to have couple of environment variables available for it.

- `WP_DOMAIN` which points to the root of your WordPress installation
- `API_KEY` is the same API key that you provided in the plugin settings page
- `NODE_ENV` to define the Node environment. This is used in example to ignore puppeteer HTTPS errors
- `SCHEDULE` to define the schedule for rendering cron job

One way to run the application is to use the Docker image provided:

```
docker run -d \
  -e "WP_DOMAIN=https://example.com" \
  -e "API_KEY=my-api-key" \
  -e "NODE_ENV=production" \
  -e "SCHEDULE=*/15 * * * *" \
  -p 80:3000 \
  --restart=unless-stoppped \
  --name=wpssr \
  columbiaroadcom/wp-ssr
```

Publishing package
------------------

[](#publishing-package)

The composer package is automatically published to `columbiaroad/wp-ssr` when a github release is made.

To publish to dockerhub you need access to the repository there. Publishing is done as follows:

```
docker build . --tag columbiaroadcom/wp-ssr:
docker push columbiaroadcom/wp-ssr:
```

TODO
----

[](#todo)

- Add `.env` file support for the Node application
- Optimize for large amount of renders
- Lock the rendering process to prevent multiple simultaneous render calls

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~51 days

Recently: every ~5 days

Total

9

Last Release

1911d ago

Major Versions

0.1.2 → v1.0.02020-06-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/034fddb1d2733d21aa32f00086a2c99d34bb8b29ba4f8619d82a17848474e064?d=identicon)[roopemerikukka](/maintainers/roopemerikukka)

---

Top Contributors

[![jarnras](https://avatars.githubusercontent.com/u/33279612?v=4)](https://github.com/jarnras "jarnras (17 commits)")[![roopemerikukka](https://avatars.githubusercontent.com/u/1453463?v=4)](https://github.com/roopemerikukka "roopemerikukka (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![laurilarjo](https://avatars.githubusercontent.com/u/721880?v=4)](https://github.com/laurilarjo "laurilarjo (1 commits)")

---

Tags

javascriptserver-side-renderingwordpresswordpress-plugin

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/columbiaroad-wp-ssr/health.svg)

```
[![Health](https://phpackages.com/badges/columbiaroad-wp-ssr/health.svg)](https://phpackages.com/packages/columbiaroad-wp-ssr)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
