This blog is powered by WordPress, an open source CMS. According to Wikipedia, WordPress is “reportedly the most popular website management or blogging system in use on the Web, supporting more than 60 million websites”. Does this mean you don’t have to worry about error handling when using WP? No, unfortunately you still need to monitor and deal with javascript errors. Typically you will include dozens of WP plugins from different authors, and there simply is no guarantee that the javascript code inside these plugins is error free. RootCause to the rescue!

1. Create a RootCause account

Head over to app.therootcause.io and register for an account. Choose a plan suitable for your team size or go with the free Hobbyist version. Then login to the application and add a new Application “My WordPress Site”.

2. Add RootCause to your WordPress pages

Adding custom javascript to your WP pages can be done a few different ways. The easiest way is probably to use a plugin, such as the Insert Headers and Footers plugin.

After downloading and installing it, open its settings in the WordPress Settings menu.

It gives you two options – to add scripts to the WP page header or footer. Since we want RootCause to initialize early, we choose the header and insert the logger js snippet.

That’s all it takes, RootCause will now report to you when errors happen on your site and you’ll be able to replay them to know exactly how they occurred. Happy debugging!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">