WordPress™

The WordPress™ integration goal is to allow collaborating on documents directly from WordPress™. The user permission will be directly managed by WordPress without any specific setup.

Important

Due to the nature of WordPress™, any document uploaded will be publicly accessible.

Installation

You can install the plugins directly like a regular WordPress™ plugin from your WordPress™ installation.

Configuration

Log into WordPress™ as an administrator. Go to the dashboard, then Settings and select Collabora Online.

../../_images/wordpress-settings.png

You can set the following options:

Setting

Description

Collabora Online server URL

The URL of the Collabora Online server. There is no default and must be set.

WOPI host URL

The URL of the WOPI host: it’s the WordPress address.

Disable TLS certificate check for COOL

Disable the TLS certificate verification when connecting to the Collabora Online server.

Caution

Should only be “checked” for development, if you don’t have valid certificates.

Token TTL in seconds

How long the document editing session is valid in seconds. (default: 86400, 24 hours)

JWT key secret

This secret is used to generate the token to access the documents.

You can generate a secret using the following command line: head -c 64 /dev/urandom | base64 -w 0.

Role of users that can review

This define which is the minimum user role to review a document (i.e. be able to add comments). (default: contributor)

Extra configuration

For the integration to work, it is important that WordPress™ be able to handle the WOPI URL. The requirement is that WordPress™ uses a permalink structure that is is not the default Plain.

Chances that this is already the case, but you should make sure it is. Got to the dashboard, then Settings and select Permalinks. For Permalink structure, any choice but Plain will work. Make sure the .htaccess rules are set properly as instructed. See WordPress documentation if you need more help.

Usage

How to add a document to your WordPress™ content for collaboration with other users.

  1. Upload the document through the media manager.

  2. Edit the post you want it attached to. In the Gutenberg editor, just add a block.

../../_images/wordpress-add-block.png

And select the document

../../_images/wordpress-block-params.png
  1. Select a mode. Possible modes are View, Review and Edit. View is a read-only mode; if the user can view the post, they can view the document. Review is a read-only mode that allow adding comments, any user with at least the role specified in the settings can review the document if they have access to the document. Edit is the fill edition mode and require to be able to edit the post the document is attached to. In any case if the user doesn’t have the proper credential they will fall back to View.

Once the post is published you can open the document. You can also use the associated permalink for a direct access. In both scenario the user will be required to login into the WordPress™ system.

Source code

The source code is available on GitHub