We recommend installing the Rollbar plugin through wpackagist if you manage your project using Composer. This way ensures the plugin and all of its dependencies are managed by Composer.

  1. If your WordPress project is not managed with Composer yet, we suggest looking into upgrading your WordPress: Using Composer with WordPress.

  2. In your composer.json add wpackagist-plugin/rollbar to your require section, i.e.:

 "require": {
 "php": ">=5.5",
 "wpackagist-plugin/rollbar": "*"
  1. Issue command composer install in the root directory of your WordPress project.

  2. In PluginsInstalled plugins find Rollbar and click Activate underneath.

  3. Copy the token value for your postclientitem and postserveritem. Your postserveritem access token is:

{{ server_access_token }}

Your postclientitem access token is:

{{ client_access_token }}

You can find these access tokens in the future by logging into your Rollbar account dashboard and going to Settings → Project Access Tokens.

  1. Navigate to Tools → Rollbar.

  2. Enable PHP error logging and/or Javascript error logging depending on your needs.

  3. Paste the tokens you copied in step 5 in Access Token section.

  4. Provide the name of your environment in Environment. By default, the environment will be taken from the WP_ENV environment variable if it's set, otherwise it's blank.

  5. Pick a minimum logging level. Only errors at that or higher level will be reported. For reference: PHP Manual: Predefined Error Constants.

  6. Click Save Changes.

For further information about the Wordpress plugin, see the docs here.