Raygun4WP plugin allows you to easily setup Crash Reporting and Real User Monitoring on Wordpress website without you having to write a single line of code.
This plugin utilizes lower-level Raygun providers to add this functionality:
- Raygun4PHP: Server-side error tracking
- Raygun4JS: Client-side error tracking and real user monitoring
The following server requirements are needed in order to use this plugin.
- PHP 5.3.3+
- Curl Installed
If you are using a *nix system, the package php5-curl may contain the required dependencies.
Manually with Git
Clone the repository into your Wordpress installation's
/plugins folder - for instance at
Make sure you use the
--recursive flag to also pull down the Raygun4PHP and Raygun4JS dependancies.
git clone --recursive https://github.com/MindscapeHQ/raygun4wordpress.git
From Wordpress plugin directory
You can also add Raygun4WP plugin repository using your admin panel. Raygun4WP is available on wordpress.org/plugins/raygun4wp/.
- Navigate to your Wordpress admin panel, click on Plugins, and then Activate Raygun4WP
- Go to the Raygun4WP settings panel either by the sidebar or admin notification
- Copy your application's API key from the Raygun dashboard and place it in the API key field.
- Enable Error Tracking (both server-side and client-side), Real User Monitoring and any other options
- Save your changes
Pulse - Real User Monitoring
As of 1.8 of Raygun4WP plugin you can enable real user monitoring.
This feature can be enabled via the Settings page under Pulse - Real User Monitoring.
User information will be sent along if you have the unique user tracking feature enabled.
Client-side error tracking
Since 1.4 of the Raygun4WP plugin you can enable client-side error monitoring.
This setting can be activated via the Settings page.
This feature can be enabled via the Settings page.
Enabling this feature will send through the currently logged in user's email address, first name and last name with each message to Raygun. This applies to both Crash Reporting and Pulse payloads.
If a user is not logged in, no user data will be sent and a random ID will be assigned to the user.
The user's information will then be available to you when viewing crash reports and user sessions. If the user has an associated Gravatar with that address, you will see their picture.
If this feature is not enabled, a random ID will be assigned to each user.
Since 1.8 both client-side and server-side errors can be tagged. Tags are custom test allowing you to easily identify errors.
Error second one being
You can enter a comma-delimited list in the field on the Config page to prevent certain domains from sending errors and from being tracked with real user monitoring.
Introduced in 1.1.3, this provider will now send asynchronously on *nix servers (async sockets) resulting in a massive speedup - POSTing to Raygun now takes ~56ms including SSL handshakes. This behaviour can be disabled in code if desired to fall back to blocking socket sends. Async sending is also unavailable on Windows due to a bug in PHP 5.3, and as a result it uses cURL processes. This can be disabled if your server is running a newer environment; please create an issue if you'd like help with this.
It is recommended to use the most recent version WordPress and PHP possible. This procedure should be first followed on a staging server that matches your production environment as closely as possible, then replicated live.
- On your root network site, install the plugin using the Admin dashboard's Plugin page as standard, but do not activate it.
- FTP in and modify wp-content/plugins/raygun4wp/raygun4wp.php - change the value on line 12 totrue.
- Visit the Admin dashboard of a child site (not the root network site). Go to its Plugin page, and you should see raygun4WP ready to be activated - do so.
- A new raygun4WP submenu will be added to the left. In there click on Configuration, paste in your API key, change the top dropdown to Enabled then click Save Changes. You can now click Send Test Error and one will appear in your dashboard.
- Repeat the above process for any other child sites - you can use different API keys (to send to different Raygun apps) or the same one.
Finally, if you so desire you should be able to visit the root network site, activate it there and configure it. You must however activate it on at least one child site first.