Publish Static Content Script

Last Updated: 17 Dec 2015

The publish_static_content.php script allows you to the publish the static content of specified assets to a set directory in the system. This script can be set to run at a scheduled time by cron or similar, effectively creating snapshots of your system for later reference.

This script takes the following arguments:

  • The system root
  • The asset IDs of the assets to publish the static content of (comma separated)
  • The directory to publish the static content to
  • --_nocache: whether to publish the _nocache version of the asset

An example of the usage of this script is shown below:

$ php publish_static_content.php [system_root] [asset_ids] [storage_path] [--_nocache]
$ php publish_static_content.php [system_root] 45, 101, 54 home/static_content --_nocache

This script has no restrictions on asset types and is located in the /scripts directory.

Previous Chapter Next Chapter

The Latest

Let Us Know What You Think

Let us know if you spot any errors or if you have any ideas on how we can improve the Matrix Community Website.

Contact Squiz for Demo

Let us show you the true power of Squiz Matrix by giving you a personalised demonstration.