Fatal Error: Call to Undefined Function

If you happen to get an error message with the words “Call to Undefined Function”, then you are in for a serious business to dig out a little further the culprit function.


You need to understand that this error usually appears in four different circumstances. You need to determine which one of them will likely be the situation in your case.

1. Installing a new theme or plugin

When installing a new plugin or a new theme, you need to check if it is compatible with current version of WordPress. Most likely the Call to Undefined Function error shows up because the theme or plugin there might be some functions that use some related functions of an old WordPress version and hence cannot be defined. The error message usually points out the line number and the file name. This is the starting point to fix. You need to understand why such code was used in that line and see the possibility of modifying it or rather removing it altogether.

2. Auto-Upgrading Theme or Plugin

It may so happen that such errors can occur during auto-upgrading a theme or plugin. In such cases, first delete the theme or plugin and try to reinstall the updated version manually.

3. Installing Multisite plugin on a single site

Some multisite plugins do not work on single sites because they are specifically designed to work on multi-site. Likewise, some single site plugins do not work on multisites. This is because the functions in one installation may not be defined for another type of installation. If this is the case, then make sure you install
the right plugin for the right type of installation.

4. Function does not exist

If you delete a function or a file within a theme or a plugin folder, then there is a high likelihood that you will get a ‘call to undefined function’. To debug this, you need to follow the error message carefully to see which function or file it is calling and throwing this error. Although it needs a deeper investigation, sometimes fresh re-installation of that particular theme or plugin also works fine.