How to get your WP Rocket API key
When you activate WP Rocket on your website, your license is automatically validated, so in most cases, you won't need to manually access your API key.
However, you may need your API key in some situations, such as manually connecting a website to your WP Rocket license, switching a website from one license to another, or troubleshooting license-related issues.
You can find your API key yourself using one of the following two methods:
Method 1: WP Rocket ZIP file
- Download the WP Rocket plugin ZIP file from your WP Rocket account page.
- Extract the WP Rocket ZIP file.
- Open the
license-data.phpfile located in the plugin files. - Look for
WP_ROCKET_KEY. The value associated withWP_ROCKET_KEYis your API key.
Heads up! Please note that if WP Rocket is already installed on your website, the license-data.php file may have been removed. If the file is missing, you can use Method 2 instead.
Method 2: WP Rocket settings export JSON file
You can also find your API key by exporting your WP Rocket settings.
- From your WordPress dashboard, go to Settings → WP Rocket → Tools.
- Under Export settings, click Download settings.
- Open the downloaded JSON file and search for
consumer_key.
The value associated with consumer_key is your WP Rocket API key.
Important: Your API key is linked to your WP Rocket account and license. Keep it private and do not share it publicly. If you are unable to retrieve your API key using either method, contact the WP Rocket support team for assistance.