PHPackages                             webiny/static-render - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. webiny/static-render

ActiveWebiny-app[Utility &amp; Helpers](/categories/utility)

webiny/static-render
====================

v1.0.0(8y ago)2221JavaScript

Since May 24Pushed 8y ago8 watchersCompare

[ Source](https://github.com/Webiny/StaticRender)[ Packagist](https://packagist.org/packages/webiny/static-render)[ RSS](/packages/webiny-static-render/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (6)Used By (0)

Static render
=============

[](#static-render)

Static render is an app that does server side render of your Webiny React app and produces a static HTML snapshot.

The app only kicks in when a bot visits the site and it works only if the site is in `production` mode.

Reason behind this app
----------------------

[](#reason-behind-this-app)

We use Webiny, which is a React based platform, to build both websites as well as web applications. For web applications it doesn’t really matter, but for **websites**, it's important that they can be properly indexed by bots and other crawlers.

Google claims that their bot can read and execute JavaScript, which is true, but only partially. There are some limitations, which are not documented and we are not certain what they are exactly. But we know that there are some because some of our pages were not indexed properly or not indexed at all, which is bad for us and our customers.

Another reason for building this app is that other search engines, like Bing, Yahoo, Baidu, DuckDuckGo and others, they don’t execute JS at all. And finally, sharing a JS page on Facebook or Twitter, just doesn’t work.

Dependencies
------------

[](#dependencies)

This is a Webiny app, meaning you need to use Webiny platform as the foundation for your website to use this application. To learn more about Webiny, head over to

Additionally you need to have the following items:

- Node 7 or greater
- PhantomJs 2.1.1 or greater

### PhantomJs 2.5.0

[](#phantomjs-250)

At the point of writing this file, Phantom 2.5.0-beta was released. From that version onwards PhantomJs supports ES6, so we jumped on the beta ship straight away. Since we are transpiling our JS using webpack, version 2.1.1 is also enough to render the pages correctly.

Installing the 2.5.0-beta requires a few steps and here is what you need to do if you are running Ubuntu (like our Vagrant machine):

1. Download the binary from this link:

Extract the archive:

```
tar -zxvf {archive name here}

```

Run the install scripts (and update the paths to match the version you downloaded):

```
sudo add-apt-repository ppa:ubuntu-toolchain-r/test

sudo apt-get update

sudo apt-get install libstdc++6 libwebp-dev libhyphen-dev libicu-dev gcc-4.9 g++-4.9

sudo mv phantomjs-2.5.0-beta-ubuntu-trusty /usr/local/share/

sudo ln -sf /usr/local/share/phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs /usr/bin

sudo chmod +x /usr/local/share/phantomjs-2.5.0-beta-ubuntu-trusty/bin/phantomjs

phantomjs --version

```

Configuration
-------------

[](#configuration)

The app has few config parameters. Here is a sample config and the explanation below:

```
StaticRender:
    Settings:
        ResourceTimeout: 1000
        CacheTtl: 86400
        PathToPhantomJs: '/usr/bin/phantomjs'
        PathToNode: '/home/vagrant/.nvm/versions/node/v7.7.1/bin/node'
```

`ResourceTimeout`Defines how log to wait before taking the snapshot of the DOM. If you see that some of your components are not loading, try increasing the number. The number is in milliseconds.

`CacheTtl`Once a snapshot is created, it is cached and this number defines for how long. The number is in seconds.

`PathToPhantomJs`This is the path to PhantomJs executable. If you installed PhantomJs using the steps in the previous section, you can set the path to the value that’s in the sample config.

`PathToNode`This is path to your node executable. If you made couple of updates to your node installation, the app might run an older version of node, depending on how your paths are set. By forcing a specific path to the node app, you can make sure it executes the commands using the latest node version.

Features
--------

[](#features)

The app also has a user interface. Using the interface via the Webiny administration you can access additional features. Those features are:

- List of all the cached URLs
- Option to delete a certain cache entry
- Force a refresh of a particular cache entry
- View the rendered HTML content of a certain cache entry
- `Fetch as bot` to see the output of the requested URL as if you were a bot

License and Contributions
-------------------------

[](#license-and-contributions)

Contributing &gt; Feel free to send PRs.

License &gt; [MIT](LICENSE)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 50.7% of commits — single point of failure

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 ~13 days

Total

3

Last Release

3144d ago

Major Versions

0.1.x-dev → 1.0.x-dev2017-09-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/4440afa738ed146b05c06073a90345e0464c4f4d042b039532d881ca24859d77?d=identicon)[SvenAlHamad](/maintainers/SvenAlHamad)

---

Top Contributors

[![SvenAlHamad](https://avatars.githubusercontent.com/u/3808420?v=4)](https://github.com/SvenAlHamad "SvenAlHamad (34 commits)")[![Pavel910](https://avatars.githubusercontent.com/u/3920893?v=4)](https://github.com/Pavel910 "Pavel910 (33 commits)")

---

Tags

nodejsphantomjsphpseoserver-side-renderingwebiny

### Embed Badge

![Health badge](/badges/webiny-static-render/health.svg)

```
[![Health](https://phpackages.com/badges/webiny-static-render/health.svg)](https://phpackages.com/packages/webiny-static-render)
```

###  Alternatives

[symfony/polyfill-php72

Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions

4.8k674.7M31](/packages/symfony-polyfill-php72)[symfony/polyfill-intl-icu

Symfony polyfill for intl's ICU-related data and classes

2.6k251.4M96](/packages/symfony-polyfill-intl-icu)[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M574](/packages/nette-php-generator)[consolidation/site-process

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

5345.3M8](/packages/consolidation-site-process)[sycho/flarum-profile-cover

Adds the ability to add a cover image to a profile.

1836.6k](/packages/sycho-flarum-profile-cover)

PHPackages © 2026

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