WordPress
WordPress and WooCommerce Plugin
The official DockRay plugin connects WordPress to the monitoring platform and automatically reports PHP errors and unhandled exceptions. Issues from WordPress, the active theme, installed plugins, or WooCommerce are sent directly to the DockRay dashboard.
Error Information
Reported events can include:
- the error type and message,
- where the error occurred and the stack trace,
- environment and application version information,
- context related to the request being processed.
You can customize which PHP errors are reported to reduce the collection of less relevant events.
Simple Configuration
You can configure the integration under Settings → DockRay by entering your project token and private key. The credentials can also be defined in the wp-config.php file.
Privacy and Developer Features
By default, DockRay does not send user data. You can optionally enable additional context such as the user ID, email address, IP address, or user agent.
The plugin also allows you to add custom tags and context, modify the client configuration, and manually report exceptions from your code.
Installation
Installation from the WordPress Plugin Directory
- In the WordPress dashboard, go to Plugins → Add New.
- Search for DockRay and click Install Now.
- Once the installation is complete, click Activate.
- Go to Settings → DockRay.
- Enter the project token and private key available in the DockRay dashboard and save the settings.
- Use the Send Test Event button to verify that the connection is working correctly.
Once configured, the plugin will automatically start reporting supported errors and exceptions to your project in DockRay.
Configuration via wp-config.php
If you do not want to store credentials in the WordPress database, you can define the project token and private key directly in the wp-config.php file:
define( 'DOCK_RAY_TOKEN', 'YOUR_PROJECT_TOKEN' );
define( 'DOCK_RAY_PRIVATE_KEY', 'YOUR_PRIVATE_KEY' );
Add these constants before the comment marking the end of the editable section in wp-config.php. Once saved, the plugin will automatically detect the configuration, and its source will be shown under Settings → DockRay.
Installation from a ZIP File
- Download the latest version of the DockRay plugin from WordPress.org.
- In the WordPress dashboard, go to Plugins → Add New → Upload Plugin.
- Select the downloaded ZIP file and start the installation.
- Activate the plugin.
- Go to Settings → DockRay and configure the connection to your project.