Title: Plugin took down website
Last modified: August 22, 2016

---

# Plugin took down website

 *  Resolved [Company 50](https://wordpress.org/support/users/co50/)
 * (@co50)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/plugin-took-down-website/)
 * Hey there,
 * Your plugin worked great until today. Added a small snippet of pre-tested code
   to rename text, clicked the update button and it took the site down. 404s. Had
   to rename the plugin folder to get site back online. Able to replicate the issue
   and narrowed down to this plugin.
 * Unfortunately, it doesn’t look like I can use this anymore….but is it possible
   to access the custom functions data that the plugin had saved so I can move it
   to a different plugin? Thanks.
 * [https://wordpress.org/plugins/my-custom-functions/](https://wordpress.org/plugins/my-custom-functions/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [arthur-gareginyan](https://wordpress.org/support/users/arthur-gareginyan/)
 * (@arthur-gareginyan)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450188)
 * Hello,
 * Yes, you can access the custom functions data that the plugin had saved.
 * For this, in **my-custom-functions.php** file, find this line of code:
 *     ```
       anarcho_cfunctions_exec();
       ```
   
 * and comment it by placing two slashes( **//** ) in beginning.
 * Then you can again activate plugin and take it from plugin page.
 *  Thread Starter [Company 50](https://wordpress.org/support/users/co50/)
 * (@co50)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450209)
 * Thanks! As it turns out, I pulled it from the MySQL database. Had to do a little
   searching but I found it. Turns out there was some errant code. Just so happens
   your plugin allowed it to go through which caused the issue. So your plugin didn’t
   cause the issue, the code did. But the plugin’s code-check is not fool-proof 
   so I’ll be more careful.
 *  Plugin Author [arthur-gareginyan](https://wordpress.org/support/users/arthur-gareginyan/)
 * (@arthur-gareginyan)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450216)
 * Can you show the code which caused the error?
 *  Thread Starter [Company 50](https://wordpress.org/support/users/co50/)
 * (@co50)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450238)
 * Basically I had a gettext function ending with this:
 * add_filter( ‘gettext’, ‘ee_change_ticket_messaging_registration’, 10, 3 );
 * and added a second similar ‘add_filter’ line under it instead of creating the
   entire function twice.
 *  Plugin Author [arthur-gareginyan](https://wordpress.org/support/users/arthur-gareginyan/)
 * (@arthur-gareginyan)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450243)
 * Ok, thank you!
 *  [Jon Brown](https://wordpress.org/support/users/jb510/)
 * (@jb510)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450470)
 * I think I triggered the same bug. In testing I wrote this code:
 *     ```
       php
       function something() {
       echo 'foo';
       }
   
       function something() {
       echo 'bar';
       }
       ```
   
 * When into mysql and this is what was saved to the DB:
 *     ```
       a:1:{s:26:"anarcho_cfunctions-content";s:126:"/* Enter Your Custom Functions Here */
   
       function something() {
       echo 'foo';
       }
   
       function something() {
       echo 'bar';
       }
   
       ";}
       ```
   
 * No the problem is it’s whitescreening the site… if as the aobve user did I renamed
   the plugin to disable it the site comes back, but then as soon as I enable the
   plugin it goes back to whitescreen. The _only_ way to fix this is to delete/fix
   the DB entry.
 * Suggestion:
    Separate plugin activation from code being active. A few plugin 
   do this now where you can activate the plugin, but the actual functionality is
   disabled until a checkbox is ticked. Then you could force that checkbox off on
   plugin activation/-reactivation in case of this scenario.
 *  Plugin Author [arthur-gareginyan](https://wordpress.org/support/users/arthur-gareginyan/)
 * (@arthur-gareginyan)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450471)
 * In your example you using two functions with the same name “something” and it
   raises an error. I’m trying to add a function to checking for similar function
   names but so far I can’t solve this.
 * Thank you for your suggestion!
 *  [Jon Brown](https://wordpress.org/support/users/jb510/)
 * (@jb510)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450474)
 * I haven’t looked at your code (I’d just grabbed it for a demo I did for my meetup
   group as an alternative to adding code to functions.php) so I don’t know how 
   and what exactly your checking, guessing though it’s just a basic syntax check.
 * My expectation was the code got run through a validator/linter. Writing two duplicate
   function names seemed like the easiest way to test it…
 * Even if I don’t like the idea of storing php in the DB where it needs to be queried
   and has higher than normal potential of being hacked by a MySQL injection… the
   plugin has a good use case I hope you get it worked out.
 *  Plugin Author [arthur-gareginyan](https://wordpress.org/support/users/arthur-gareginyan/)
 * (@arthur-gareginyan)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450475)
 * Yes, the plugin have just a basic syntax checker. Maybe you advise some validator/
   linter for using it in the plugin?
 * I was have choosing between storing php in the DB or in the file. You think storing
   php in the file is better?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Plugin took down website’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/my-custom-functions_0e1030.svg)
 * [My Custom Functions](https://wordpress.org/plugins/my-custom-functions/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-custom-functions/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-custom-functions/)
 * [Active Topics](https://wordpress.org/support/plugin/my-custom-functions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-custom-functions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-custom-functions/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [arthur-gareginyan](https://wordpress.org/support/users/arthur-gareginyan/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/plugin-took-down-website/#post-5450475)
 * Status: resolved