How to implement Sentry on WordPress? [closed]

For php I used this guide: https://cloudpresshosting.co.uk/blog/reporting-wordpress-errors-to-sentry For JS, I found out I can take the code of the bundle and the initialization and put in the header, using “add scripts to header and footer” plugin. https://wordpress.org/plugins/header-and-footer-scripts It took me time to notice I can’t put the initialization within the bundle import. Got something like … Read more

WP Site Only Shows Javascript for Main Page

If you’ve disabled all plugins and switched back to the default Twenty Ten (or Twenty Eleven) theme and are still seeing this, then you’ve got a serious problem. First of all, the JavaScript is horribly obfuscated. Second of all, with no plugins and a default theme, you should see the default layout of WordPress. From … Read more

Unexpected Output: register_activation_hook with namespace

When we are outside the Sample namespace, we should call the function by \Sample\sp_activate(), so please try the following: <?php /** * Plugin Name: Sample Plugin * Version: 0.0.2 */ namespace Sample; \register_activation_hook( __FILE__, ‘\Sample\sp_activate’ ); function sp_activate() { } If something is printed out during the plugin activation it will result in unexpected output … Read more

Removing warnings and notices from production servers

As many have already commented, it is better to fix the source of the issue than to hide the messages. That said, these types of messages should never be displayed on production server but, since you just never know, it is also a good idea to disable them on all servers (local development machine, development … Read more