wpsnoop Fatal error: Cannot redeclare getposts()

If you are dealing with a WordPress issue where a PHP Function getposts() 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 6 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 6 different instances of potential conflicts where different plugins or themes share the function name.

Examples of this error include:

PHP Fatal error: Cannot redeclare getposts() (previously declared in wp-content/plugins/rest-api-to-miniprogram/includes/ram-util.php:634)

This file is part of the WordPress plugin REST API TO MiniProgram 微慕小程序 and could be interacting with another theme or plugin and causing a fatal error.

PHP Fatal error: Cannot redeclare getposts() (previously declared in wp-content/plugins/linkmyposts/lmp_database.php:143)

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

PHP Fatal error: Cannot redeclare getposts() (previously declared in wp-content/plugins/adminimal/inc/adminimal.php:31)

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

PHP Fatal error: Cannot redeclare getposts() (previously declared in wp-content/plugins/grid-buddy/grid-buddy.php:664)

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

PHP Fatal error: Cannot redeclare getposts() (previously declared in wp-content/plugins/most-liked-posts/MostLikedPosts.php:66)

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

PHP Fatal error: Cannot redeclare getposts() (previously declared in wp-content/plugins/news-ticker-pluginleopedia/leopediastore_wordpressticker.php:443)

This file is part of the WordPress plugin Leopedia Store Ticker Plugin 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.