Support » Plugin: Popup by Supsystic » Fatal Error: Cannot redeclare tgmpa()

  • Resolved kjy112


    Fatal error: Cannot redeclare tgmpa() (previously declared in /public_html/wp-content/plugins/popup-by-supsystic/modules/tgm_promo/classes/class-tgm-plugin-activation.php:2126) in /public_html/wp-content/themes/xx/includes/plugins/class-tgm-plugin-activation.php on line 2118

    I am getting a fatal error for admin dashboard. The frontend is fine…its just the backend after updating to 1.9.10. Is there a way around not declaring tgmpa twice and still make this popup plugin work?

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m getting the same error but cannot log in because of it

    It’s a clash of tgmpa() function declared by this plugin and also by my theme. Both using class-tgm-plugin-activation.php for “recommend activation of plugins” notifications in the admin panel.

    Is there a way around this?

    This is typically caused by a theme author having done an incorrect search & replace in the TGMPA file.

    The simplest way to get round this, is to replace the file.

    1. Download the current version of the library from (for your purposes, just click on the “Zipball” link below the form)
    2. Unzip the file and
    3. Copy/upload (via FTP) just the class-tgm-plugin-activation.php file to the /public_html/wp-content/themes/xx/includes/plugins/class-tgm-plugin-activation.php directory of your website, replacing the existing class-tgm-plugin-activation.php file.

    Once you’ve done that, all should be fine again.

    All the same, please contact the Theme author and ask them to update the TGMPA file they include with their theme. They should download a fresh copy of TGMPA using the Custom TGMPA Generator, which will serve them with a customized download of TGMPA which will automagically have done the search & replace the correct way.

    Hope this helps.

    Plugin Author supsystic


    Hi, @kjy112

    This is a conflict with template.
    We will release a fix for it.
    I’ll inform you about update.

    Best regards.

    @supsystic This is not something you should “fix”, you will only be making things worse. This is an issue with the theme the user is using, not your plugin.


    Thank you for this. Works like a charm. I’ve contacted the theme author. Thank you for the prompt response @supsysticcom

    • This reply was modified 1 year, 1 month ago by  kjy112.
    Plugin Author supsystic


    I’m glad that you solved the issue.
    If you have any other questions, just let us know.

    Best regards.

    Hi @supsysticcom,

    I am having the same issue (Cannot redeclare tgmpa() (previously declared in C:\wamp\www\teccraft\wp-content\plugins\famethemes-demo-importer\inc\class-tgm-plugin-activation.php:2126) in C:\wamp\www\teccraft\wp-content\themes\onetone\includes\class-tgm-plugin-activation.php on line 2175) with my theme OneTone. As its size was slightly larger than the maximum size to upload on wordpress, so I just copied it to the themes folder at wamp and then instal it. However, upon activating the this theme, it is generating this error everywhere I navigate on my site. I really want to get rid of this issue now.
    Thanks in advance.

    HEEEEEEELP! How do I get to the ftp?! Can’t access the backend, know shit about this FTP. Site not developed by me. Many thanks, life savers!

    Plugin Author supsystic


    Hello, @carousm

    You should use such FTP credentials to connect your ftp server – hostname, username and password of your FTP server. If you don’t know this information, you can ask about it your hosting provider.

    Can you specify, what is wrong with plugin on your website?

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.