WP Rocket installation from GitHub using Composer

WP Rocket can be installed directly from our GitHub repository:



  • Composer - this has to be installed on the PC/server where you are planning to install WP Rocket.
  • PHP 7.3 or greater - this is necessary to run Mozart, one of the dependencies, i.e. it's not WP Rocket's minimum supported PHP version.


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:


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:



  • 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:


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.