Forums

[resolved] Fatal error: Call to undefined function: add_filter() (4 posts)

  1. gmliii
    Member
    Posted 5 years ago #

    Hi-

    I just tried to upgrade from WP 2.07 to 2.1. I have done earlier upgrades without a problem. I am receiving the following error when I try to go to http://www.gml-law.com/wp-admin/upgrade.php:

    Fatal error: Call to undefined function: add_filter() in /home/fhlinux182/g/gml-law.com/user/htdocs/wp-includes/default-filters.php on line 4

    I have now downloaded and installed version 2.1 twice and continue to receive this error.

    I have been here (http://wordpress.org/support/topic/68707?replies=4) and it is not helpful to me. Likewise, this page (http://codex.wordpress.org/Changing_File_Permissions) is not helpful.

    Can someone please give me a hand as this is my work site (it's just me) and I'd like to get this working ASAP. If it is a permissions issue (as I suspect it is and just cannot figure out), can you give me specific file names and permission numbers?

    Thank you in advance.

  2. Austin Matzko
    Member
    Posted 5 years ago #

    Most likely not all of the new files were copied correctly.

    Follow these instructions, especially the part that involves deleting the old files. Sometimes new files don't overwrite old files, causing these sorts of errors.

  3. gmliii
    Member
    Posted 5 years ago #

    Thanks, filosofo.

  4. merwyck
    Member
    Posted 5 years ago #

    Here's what did it for me:

    In the wp-settings.php file on line 135 you'll see these two lines:

    require (ABSPATH . WPINC . '/functions.php');
    require (ABSPATH . WPINC . '/plugin.php');

    Just reverse the order they're listed in because the add_filter() function is NOT in the functions.php file; it's in the plugin.php file so... they should now look like this:

    require (ABSPATH . WPINC . '/plugin.php');
    require (ABSPATH . WPINC . '/functions.php');

    and you're GOOD TO GO!!

Topic Closed

This topic has been closed to new replies.

About this Topic