WP Rocket installation from GitHub using Composer

WP Rocket can be installed directly from our GitHub repository:

https://github.com/wp-media/wp-rocket

Requirements:

  • Composer - this has to be installed on the PC/server where you are planning to install WP Rocket on.

Installation

To install WP Rocket from GitHub follow these steps:

  1. Copy WP Rocket’s installation folder in the /wp-content/plugin/ folder either by downloading and unzipping the plugin’s file:

https://github.com/wp-media/wp-rocket/archive/master.zip

or by using git:

git clone https://github.com/wp-media/wp-rocket.git
  1. In the terminal navigate to /wp-content/plugins/wp-rocket/
  2. Run the following command:
  3. composer install --no-dev --no-scripts
    	

This will create a /vendor/ folder in WP Rocket’s root folder. It will include the 3rd-party libraries that WP Rocket uses.

WP Rocket's License

To add your license's info you'll have to define the following two constants in the  wp-config.php file:

define( 'WP_ROCKET_EMAIL', 'YOUR_ACCOUNT_EMAIL');
define( 'WP_ROCKET_KEY', 'YOUR_API_KEY');

Replace:

  • YOUR_ACCOUNT_EMAIL with the email of your WP Rocket account.
  • YOUR_API_KEY with your API Key.

To find your API Key, download WP Rocket from your account:

https://wp-rocket.me/account/

Open the license-data.php file and copy the value of WP_ROCKET_KEY.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.