Redirect after plugin activation

Use WP_DEBUG to Get a List of Errors

To get a readout of what PHP errors might be causing your site’s problems, you’ll need to turn on the WP_DEBUG tool. To do this, open up your wp-config.php file and add the following line of code (if it is not already present):

define( ‘WP_DEBUG’, true );

Once you’ve done that, you will be able to see WordPress-generated debug messages on your site’s individual pages. By reading through these, you may be able to pinpoint the cause of the “Sorry, you are not allowed to access this page” error.

With WP_DEBUG turned on, you can also look at the generated entries located in wp-contents/debug.log. That way, all errors will be displayed in one easy-to-find location.