Call to Undefined Function in WordPress

Call to Undefined Function in WordPress: How to Fix this Error

In WordPress by Fathi ArfaouiLeave a Comment

WordPress is the most flexible content management system and blogging platform and that’s good for all of us. But sometimes, we forget that the flexibility has limits and we should understand that lots of plugins and themes can’t work with all the versions of WordPress.

At the same time, some other mistakes can cause fatal errors like “Call to Undefined Function” or “Connection Timed Out” and even “error establishing a database connection“.

All these problems can be fixed if you investigate the latest changes you’ve made on the blog and that includes the latest installed themes, plugins, and even codes. Today, I’ll show you how to fix this message error in your WordPress website, and what’s the matter with that.

The “Call to Undefined Function” is a result of one of the below cases, and you need to choose the one that you think caused the problem, depending on your situation. Just follow them and you will succeed in resolving the issue and make your site work again.

Incompatible WordPress Plugin or Theme

This is the first thing that can cause the problems, if you’ve installed a theme or a plugin, without verifying the compatibility with the WordPress versions, then, you need to check the details again. With thousands of WordPress plugins, people install them fast, and they only notice the rating, the name, but not, the plugin compatibility with its version.

To find the plugin compatibility, visit its page on WordPress website. Then, look for “Requires” and “Compatible up to” in the right section of the page, just under the plugin info as the following screenshot from the Jetpack plugin, just look for the needed version.

Call to Undefined Function

As you can see, the plugin in this example will only work with a minimum WordPress version of 3.8. So, if you are using an older version, such as 3.1 you will get an error, and the site will never work under that setting.

At the same time, the plugin is compatible up to WordPress version 3.9.1 and that means no errors and no problems if you have, at least a WordPress version between  3.8 and 3.9.1. So if WordPress has a new version called 4, then, your plugin will not work properly, or will never work completely.

In this case, the solution is to update your WordPress version if you’re using an old one, or to update the plugin to the latest version from the official website. If you can’t find a version that works, then, deactivate and delete your plugin.

You can also deactivate the plugin and see if the problem was solved or not, that will help. If you’re using a premium plugin, then, visit the seller’s page and look, for the vision and the compatibility.

The same thing applies to themes, you need to make sure that the theme works with your version and you can find that by visiting your plugin page on WordPress if you’re using it from there. Or, see the seller’s page if you have a premium theme. Then, compare your version with the requirement, and see what you have to do.

To find your WordPress version, login to your admin area, and you will find it at the bottom of the page, it’s always there as the next screenshot.

Call to Undefined Function in WordPress

Error when auto-install or auto-upgrade a plugin or a theme

This is the second thing to verify. If you’ve installed a plugin or a theme automatically, from your WordPress admin area, and get the error, then, make sure to reinstall your plugin or theme manually. But first, you need to delete the theme completely to avoid getting errors.

I’ve already created a step by step tutorial on installing a WordPress theme and also, another post that shows you how to install your WordPress plugins. Both of these tutorials will show you the manual installation if you can’t install the file automatically. Please make sure to delete your plugin or theme before making the manual installations.

You’ve installed a WordPress multisite plugin on a single site

This is another mistake that can cause the undefined function errors. Make sure that you are using a plugin for your installation type. The multisite plugins won’t work on a single site installation in the majority of cases, and vice versa.

In this case, you need to verify the plugin details and info page and look if you can use it in your single site or not. At the same time, make sure to update your WordPress to the latest version. That will solve the problem if it was in the version compatibility.

Not an existing function

This happens to developers in general, but if you’ve deleted a plugin or a theme, or even a file, then, you will notice errors about missing functions. This case needs lots of debugging and investigation in the WordPress files.

So, if you get errors, just read carefully the exact message that you get, and follow its destination or the PHP error that you get. Then, look at the declared destination or function, and see if you’ve errors there. Check your “functions.php” file and see if you have the missed function or not. Then, add it manually or ask someone who knows exactly how to do that.

Fathi Arfaoui: A Physicist, Blogger, and the founder and owner of Trustiko.com. He shares Business, Blogging, WordPress, Web Safety, and Blogging tips to build better websites and blogs. Also, he shares online marketing strategies and recommendations.

Leave a Comment