Skip to content

Deployment Documentation

jmstacey edited this page Aug 30, 2010 · 5 revisions

1. Plugin installation

The WP Stream Wrappers plugin provides the foundation upon which other WordPress stream wrappers can build. Installation of the WP Stream Wrappers plugin follows the same pattern as most other WordPress plugins. Simply download the .zip archive, extract in the plugins directory, and activate. See the WordPress Codex for more detailed information on managing plugins.

The latest .zip archives can be found on the project Downloads page. Better yet, you can checkout with git and easily stay up to date: git clone git://github.com/jmstacey/wp-stream-wrappers.git.

2. The WP Local Stream Wrapper

The WP Stream Wrappers plugin comes with a single stream wrapper called WP Local Stream Wrapper. It provides an implementation for the ‘local://’ protocol. By default this points to the WP_CONTENT_DIR variable which is typically the wp-content/ directory. There are two purposes for this wrapper: provide access to local files in stream form and provide and example of how to create a stream wrapper.

3. Finding and installing 3rd party stream wrappers

WP Stream Wrappers really shines when you add additional 3rd party stream wrappers to enable additional functionality. For example, you might want a YouTube stream wrapper, or perhaps Amazon S3 to fulfill your needs. 3rd party stream wrappers are separate WordPress plugins that build on the WP Stream Wrappers core. Installation of these 3rd party stream wrapper plugins follow the same installation procedures as all other WordPress plugins. Simply download, extract, and activate. 3rd party stream wrappers may have additional configuration settings such as supplying API authorization keys. Refer to the documentation of each respective stream wrapper for additional information requirements.

See List of 3rd party stream wrappers.

4. Creating custom local stream wrappers is easy

Perhaps you want a stream wrapper to point to one of your NAS devices. Creating a custom local stream wrappers to accomplish this is very easy. WP Stream Wrappers provides a base class for wrappers that manipulate local files. A customized local stream wrapper can be created with just a handful of code, basically specifying where the URI scheme should resolve to.