TypeRocket v1 Pro users can now upgrade to TypeRocket v5 at their convenience.
Install With Composer
( v1 )
- # Requirements
 - # Licensing & Use
 - # Install TypeRocket Pro with Composer
 - # 1. Authenticate
 - # 2. Installation Types
 - # 2.1 MU Install
 - # 2.2 Root Install
 - # Updating
 
Requirements
Before getting started, be sure your setup supports the TypeRocket Pro system and browser requirements.
Important: Pro users with a Plus or Max license will have access to composer. Single site licenses do not have composer access.
Licensing & Use
Before installing TypeRocket using composer, be aware of the licensing restrictions and our advice on how TypeRocket should be used.
Install TypeRocket Pro with Composer
To install TypeRocket Pro using composer, first download composer and install it globally. You can read the full instructions on the composer.org website.
Important: Composer 1.10.0+ is required. If you do not have the latest version of Composer you can update using the command composer selfupdate --stable.
1. Authenticate
Enable access to the TypeRocket composer repository by authenticating your server or development computer with typerocket.repo.packagist.com using your "Composer Token". You can access your token from your TypeRocket account.
Authenticate composer by replacing the text YOUR_TOKEN_GOES_HERE from the following command with your token. From the command line run:
composer config --global --auth http-basic.typerocket.repo.packagist.com token YOUR_TOKEN_GOES_HERE
Note: Token authentication is required only once per machine or server.
2. Installation Types
There are two recommended ways to download and install TypeRocket Pro using composer:
- WordPress MU Plugin install.
 - Root install.
 
For beginners, the MU install is the fittest place to start.
Note: Only one installation type is required for TypeRocket to work. Either the theme install or the root install. Also, you should not install TypeRocket into an existing plugin or theme.
2.1 MU Install
From the command line, go to your wordpress/wp-content/mu-plugins folder. Then, replace YOUR_URL_HERE in the following command with the "Composer URL" from your acount page and run it:
composer create-project --prefer-dist typerocket/pro typerocket --add-repository --repository=YOUR_URL_HERE
Finally, in the root of your WordPress MU plugins folder create a PHP file named typerocket.php and add the following.
<?php
/*
Plugin Name: TypeRocket Pro MU  
Description: MU plugin installation.  
Author: TypeRocket  
Version: 1  
Author URI: http://typerocket.com  
*/
define('TR_MU_INSTALL', '/typerocket/wordpress/');  
require ('typerocket/init.php');
2.2 Root Install
Note: You do not need to install WordPress before doing a root install.
To install TypeRocket as your root application, create the TypeRocket Pro project in a new location run from the command line. Replace YOUR_URL_HERE in the following command with the "Composer URL" from your account page and run it:
composer create-project --prefer-dist typerocket/pro typerocket --add-repository --repository=YOUR_URL_HERE
cd typerocket
Next, use the TypeRocket Galaxy CLI root:install command to install WordPress and start your project:
php galaxy root:install {database} {db_username} {db_password}
TypeRocket root install is now complete. You can access the WordPress files from the typerocket/wordpress folder. Finally, Complete the WordPress installation by pointing your servers root web folder to the typerocket/wordpress and then visit your site's web address.
PHP Server
Optionally, if you do not have a web server configured, you can use the built-in TypeRocket PHP server on your local machine to view your WordPress site. From the command line, navigate to the typerocket/wordpress folder and run the following command:
php -S localhost:8888 ../server.php
In your browser, visit localhost:8888 to view the WordPress install page.
What Root Install Does
Running root:install will:
- Downloads WordPress in the 
wordpressfolder where the assets are located. - Creates the 
wp-config.phpfile in the main TypeRocket folder. - Enables TypeRocket's root theme and removes all WordPress themes.
 - Installs TypeRocket MU plugin allowing for theme URL overrides.
 - Add 
require __DIR__ . '/init.php';to yourwp-config.php. 
Deploying A Root Install
When pushing your code to a production server, ensure that you have the correct wp-config.php settings, the MU TypeRocket WordPress plugin, and the correct TypeRocket configuration.
Note, when rooting TypeRocket wp-config.php is modified and init.php is required after the ABSPATH is defined. This is important to note because you need to require the init.php in wp-config.php for production and not just development.
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
require __DIR__ . '/init.php'; // Include TypeRocket
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Updating
To update TypeRocket run composer update. This will update all the PHP code and JS/CSS assets.
Found a typo? Something is wrong in this documentation? Fork and edit it!