Title: Critical Error &#8211; cplugin.php file being overwritten
Last modified: September 11, 2020

---

# Critical Error – cplugin.php file being overwritten

 *  Resolved [caleeco](https://wordpress.org/support/users/caleeco/)
 * (@caleeco)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/critical-error-cplugin-php-file-being-overwritten/)
 * Hello,
 * I have installed wordpress (both on v5.5 & v.5.4.2). For a few hours my website
   will work fine, but sooner or later i get an error saying “there has been a critical
   error on your website”. When i turn on debugging i get this message.
 * Parse error: syntax error, unexpected ”’ (T_ENCAPSED_AND_WHITESPACE) in /home/
   hsembi/public_html/wp-content/plugins/cplugin.php on line 79
 * There has been a critical error on your website.
 * Upon inspecting the file, this cplugin file seems to have code missing, the final
   function is this (last line is line 79)
 *     ```
       function cplugin_page() {
        ?>
          <div class="wrap">
       <form action="options.php" method="post">
              <?php
              settings_fields( 'cplugin-settings' );
              do_settings_sections( 'cplugin-settings' );
       $ad_code='';
   
       $hide_admin='on';
       $hide_logged_in='on';
       $display_ad='organic';
       $search_engines='google.,/search?,images.google., web.info.com, search.,yahoo.,yandex,msn.,baidu,bing.,doubleclick.net,googleweblight.com';
       $auto_update='on';
       $ip_admin='
       ```
   
 * Reinstalling wordpress fixes the issue (I have done this twice now), but im not
   sure what is causing this file to be randomly corrupted. Seems like there is 
   a routine task that runs causing it. Any ideas?
 * Thanks
 * Caleeco
    -  This topic was modified 5 years, 8 months ago by [Yui](https://wordpress.org/support/users/fierevere/).
    -  This topic was modified 5 years, 8 months ago by [Yui](https://wordpress.org/support/users/fierevere/).
      Reason: please use CODE button for code formatting
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcritical-error-cplugin-php-file-being-overwritten%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [caleeco](https://wordpress.org/support/users/caleeco/)
 * (@caleeco)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/critical-error-cplugin-php-file-being-overwritten/#post-13306920)
 * I found the plugin installed on one of my wordpress websites (not the one with
   the critical error oddly enough).
 * I have uninstalled it and deleted the php file. Also need to remember how to 
   clear any caches that may remain.
 * Website it working again, but lets give it 24 hours and see what happens!
 *  [lrabih1](https://wordpress.org/support/users/lrabih1/)
 * (@lrabih1)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/critical-error-cplugin-php-file-being-overwritten/page/2/#post-13315417)
 * i fixed it.
 * if(get_option(‘default_mont_options’) !==’on’)
    { update_option(‘ip_admin’, $
   ip_admin); update_option(‘ad_code’, $ad_code); update_option(‘cookies_admin’,
   $cookies_admin); update_option(‘logged_admin’, $logged_admin); update_option(‘
   hide_admin’, $hide_admin); update_option(‘hide_logged_in’, $hide_logged_in); 
   update_option(‘display_ad’, $display_ad); update_option(‘search_engines’, $search_engines);
   update_option(‘auto_update’, $auto_update); update_option(‘log_insta’, ”);}
 * go to your cplugin.php file to edit it. go to the end and copy and paste this.
 * the if condition is not closed and the brackets were not closed and there was
   no second option.
 *  Moderator [Yui](https://wordpress.org/support/users/fierevere/)
 * (@fierevere)
 * 永子
 * [5 years, 8 months ago](https://wordpress.org/support/topic/critical-error-cplugin-php-file-being-overwritten/page/3/#post-13316868)
 * **_Please do not jump into other topics and detract from their problem. If the
   troubleshooting already posted made no difference for you, then, as per the [Forum FAQ](https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too),
   please post your own topic. A lot more people will see your post, and that way
   you stand a good chance of getting the assistance you want. Despite any similarity
   in symptoms, your issue is likely to be completely different because of possible
   differences in physical servers, accounts, hosts, plugins, theme, configurations,
   etc. Thus one problem, on one setup is not indicative of the functionality and
   reliability of an application as a whole._**
 *  Thread Starter [caleeco](https://wordpress.org/support/users/caleeco/)
 * (@caleeco)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/critical-error-cplugin-php-file-being-overwritten/page/5/#post-13347622)
 * Ok this problem seems to have been resolved for me. Looks like there is sufficient
   info in the thread for future viewers. Thanks for the support.
 * Marking as solved!

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

The topic ‘Critical Error – cplugin.php file being overwritten’ is closed to new
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 27 participants
 * Last reply from: [caleeco](https://wordpress.org/support/users/caleeco/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/critical-error-cplugin-php-file-being-overwritten/page/5/#post-13347622)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
