wpsnoop Fatal error: Cannot redeclare twig_trim_filter()

If you are dealing with a WordPress issue where a PHP Function twig_trim_filter() was already declared it is most likely due to a plugin/theme conflict.

wpsnoop scanned and analyzed over 100,000 WordPress plugins and themes to find and locate potential conflicts including functions that share the same name.

This page has information on the 20 places where that function is declared and used in WordPress plugins and themes.

Note: Our database currently only taps into the free themes and plugins available in the publicly available WordPress plugins and themes, if your site uses paid plugins, themes or custom code there may be additional conflicts.


Our database has uncovered 20 different instances of potential conflicts where different plugins or themes share the function name.

Examples of this error include:

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/projects-m-membership/vendor/twig/twig/lib/Twig/Extension/Core.php:862)

This file is part of the WordPress plugin Projects M Membership and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/kudos-donations/vendor/twig/twig/src/Extension/CoreExtension.php:1008)

This file is part of the WordPress plugin Kudos Donations and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/janey-ai/includes/twig/vendor/twig/twig/lib/Twig/Extension/Core.php:863)

This file is part of the WordPress plugin Janey AI and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/fontsampler/vendor/twig/twig/src/Extension/CoreExtension.php:1005)

This file is part of the WordPress plugin Fontsampler and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/Extension/CoreExtension.php:1005)

This file is part of the WordPress plugin Dynamic Mailto and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/mdirector-newsletter/vendor/twig/twig/lib/Twig/Extension/Core.php:954)

This file is part of the WordPress plugin MDirector Newsletter and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/publishpress/vendor/twig/twig/src/Extension/CoreExtension.php:982)

This file is part of the WordPress plugin PublishPress and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/publishpress-authors/vendor/twig/twig/src/Extension/CoreExtension.php:982)

This file is part of the WordPress plugin PublishPress Authors and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/2fas/vendor/twig/twig/src/Extension/CoreExtension.php:982)

This file is part of the WordPress plugin 2FAS Classic — Two Factor Authentication and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/2fas-light/vendor/twig/twig/src/Extension/CoreExtension.php:970)

This file is part of the WordPress plugin 2FAS Prime — Two Factor Authentication and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/konfirmi/vendor/twig/twig/src/Extension/CoreExtension.php:1008)

This file is part of the WordPress plugin Konfirmi Plugin and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/wp-rss-aggregator/vendor/twig/twig/src/Extension/CoreExtension.php:979)

This file is part of the WordPress plugin WP RSS Aggregator and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/uploadcare/vendor/twig/twig/src/Extension/CoreExtension.php:994)

This file is part of the WordPress plugin Uploadcare File Uploader and Adaptive Delivery and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/lib/Twig/Extension/Core.php:954)

This file is part of the WordPress plugin Shortcode Mastery and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/rafa-azure-simple-upload/vendor/twig/twig/lib/Twig/Extension/Core.php:954)

This file is part of the WordPress plugin Rafa Azure Simple Upload and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/landing-pages-app/vendor/twig/twig/src/Extension/CoreExtension.php:982)

This file is part of the WordPress plugin Landing Pages App and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/landingi-landing-pages/vendor/twig/twig/src/Extension/CoreExtension.php:982)

This file is part of the WordPress plugin Landingi Landing pages and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/gutenplatz/vendor/twig/twig/src/Extension/CoreExtension.php:1002)

This file is part of the WordPress plugin Gutenplatz and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/magic-password/vendor/twig/twig/lib/Twig/Extension/Core.php:955)

This file is part of the WordPress plugin Magic Password and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare twig_trim_filter() (previously declared in wp-content/plugins/wp-social-bookmarking-light/vendor/twig/twig/lib/Twig/Extension/Core.php:955)

This file is part of the WordPress plugin WP Social Bookmarking Light and could be interacting with another theme or plugin and causing a fatal error.

The error occurs because two (or more) plugins that you are using are both trying to declare a function with the same name.