Pressbooks is a content management system designed for books and OERs that is built on top of WordPress Multisite. You can install the Pressbooks plugin and themes anywhere you can run WordPress, but this guide will make sure you can navigate Pressbooks's various installation requirements.
It is important to note that not all features of Pressbooks will be available if you try to run it in a Shared Hosting (cPanel) account. Pressbooks requires some third-party libraries to enable its export features. These tools are not available on Shared Hosting accounts, but can be installed when setting up Pressbooks on Reclaim Cloud. For this reason, PDF, EPUB, XHTML, OpenDocument, and HTMLBook exports are not supported with Pressbooks on Shared Hosting.
Step 1: Find the required WordPress version and PHP version
Pressbooks has very specific requirements as to what version of their plugin can run on which versions of WordPress and PHP. The best way to find the requirements is to go to the GitHub page for the Pressbooks plugin, and scroll down to the Requirements section.
If you happen to be installing an older version of Pressbooks, you can also find the required version of PHP and WordPress by taking a look at lines 9 and 10 of the plugin's pressbooks.php file.
Step 2: Install a fresh WordPress Multisite using the correct PHP version
In cPanel environments, you will need to change the PHP version for the domain you will be setting up Pressbooks on, using the MultiPHP Manager tool. We have a guide on how to set this here:
Changing Your PHP Version in cPanel
Once you've set your PHP version, you can use Installatron to install WordPress. Click on WordPress in the Applications section of cPanel.
Next, click Install this application.
On the install page, you will select the desired domain and URL.
Make sure to choose the correct version of WordPress that Pressbooks supports in the Version section.
Under Automatic Update, select Do not automatically update. You will want to decide when to have Installatron run WordPress updates for you manually, otherwise you may have issues with version mismatches between Pressbooks and WordPress.
In the settings section, you will want to make sure to select the option Yes, enable multi-site support for sub-directories of the selected install location.
Finally, click Install at the bottom of the Page.
Log in to your Reclaim Cloud account, and click on Marketplace. Search for WordPress and install the WordPress Standalone Kit.
Make sure to change the PHP version to the one supported by Pressbooks, and check the box next to Install WordPress Multisite Network. When you are ready, click Install.
After a few minutes, your WordPress site will be ready. If you need to change to a different version of WordPress that Pressbooks supports, click on Add-Ons next to the AppServer node for your WordPress environment.
Find the Replace / Upgrade WordPress Core Files Add-On from the list, then click Install.
Enter the version of WordPress that Pressbooks requires, then click Install.
Step 3: Install the Pressbooks Themes and Plugin
Themes
Download the zip file from the releases page of the McLuhan and Aldine themes as well as any other book themes you would like to use from GitHub.
Log in to your WordPress site, and go to My Sites > Network Admin > Themes.
Click Add New, then Upload theme.
Use the Browse button to select the McLuhan theme (the file name should start with pressbooks-book) you downloaded. After selecting the theme zip file, click Install Now.
Do not Network Enable the theme just yet. Go to the themes page again and repeat this process for the Aldine theme as well as any other book themes you downloaded from GitHub.
Plugins
Download the latest zip from the releases pages of the Pressbooks plugin from GitHub.
Go to My Sites > Network Admin > Plugins.
Click Add New, then Upload plugin.
Use the Browse button to select the Pressbooks plugin you downloaded. After selecting the plugin zip file, click Install Now.
Click Network Activate to activate the Pressbooks plugin and themes.
Step 4: Enable Book Exports (only available on Reclaim Cloud)
There are several dependencies that Pressbooks requires to enable import and export functionality. Unfortunately, these dependencies are incompatible with Shared Hosting, but they can be automatically installed on Reclaim Cloud with an add-on for your WordPress environment.
First log in to Reclaim Cloud. Next, to the AppServer node for your WordPress environment, click on Add-Ons.
Find the Install Pressbooks dependencies Add-On from the list, then click Install. Click Install again on the confirmation window that appears.
This add-on will automatically install EpubCheck, Saxon-HE, and the free noncommercial use version of PrinceXML. You should read the End-User License Agreement for PrinceXML before using it to determine if your use case fits into the terms of its noncommercial license. If you wish to remove the watermark from PDF files it creates, or you have a commercial use case, you should buy a license for PrinceXML and follow their instructions to install the license file.
Upgrading Pressbooks
If you'd like to upgrade your Pressbooks site, you can use a similar strategy to the steps outlined in the install guide above.
- 1. Find the requirements for the newest version of Pressbooks by visiting the GitHub page for the Pressbooks plugin, and scroll down to the Requirements section, just like in Step 1 above.
- Upgrade WordPress to the version that Pressbooks supports, on cPanel you can use Installatron to do this, and on Reclaim Cloud, you'll want to use the Replace / Upgrade WordPress Core Files Add-on. This is similar to step 2 of the guide above, but of course, you won't be installing a fresh site. If it is necessary to upgrade to a new version of PHP, you can do so on cPanel using the MultiPHP Manager or on Recalim Cloud using the Redeploy button or Topology Wizard.
- Follow step 3 from the guide above to upload and install the latest Pressbooks plugin and themes, allowing WordPress to overwrite the old version of the plugins and themes with the new ones.
- Finally, if you are on Reclaim Cloud and you changed your PHP version as part of this upgrade process, you will need to reinstall the dependencies that allow Pressbooks to export books to PDF, EPUB, and other formats. You can do this by following Step 4 from the above guide.