I am very new to plugin development. I have created my first plugin but when I activated it, it caused the majority of every page on the site to stop being generated. I have echoed something from the end of the php script to confirm that it was completing without an error. But other than that I have no idea what I should do to debug this problem.

I would like to be able to work on this on a public site that will be getting traffic while I work, is there a way I can have the plugin only activated on one page or only for me and not for guests?

I would like to be able to show debug messages, is there a convenient way to do this?

Are there points outside of my plugin that would be helpful for debugging? I don't know where to look that might be leading to the problems.

  • 1
    I am fairly sure that this question is a functional duplicate of this one.
    – s_ha_dum
    Commented Feb 19, 2014 at 16:49
  • Thank you that was helpful, I couldn't find it with what I was searching, it doesn't have the most useful title/tags in my opinion. Commented Feb 19, 2014 at 16:52
  • 1
    You can suggest a different title. The community will vote your change in, or reject it.
    – s_ha_dum
    Commented Feb 19, 2014 at 16:59

1 Answer 1


1. You should NEVER work on a live site

Just setup a local installation of WAMP or MAMP and do your testing there. This has a lot of benefits:

  • You can't break a live site
  • You don't need to upload changed files
  • It runs faster as everything is local and doesn't go trough the internet

2. Debugging

First you could enable debug in config.php

define('WP_DEBUG', true);

This will give you a lot more information what went wrong if something goes wrong.

There also is a lot more info in the WordPress Codex on Debugging in WordPress

  • How will the debug out be rendered when I do this? I've done this and the only errors I see are wamp errors. Is wamp interfering with WordPress errors? Commented Feb 19, 2014 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.