Support » Fixing WordPress » Deprecated: Function create_function() is deprecated

  • leeannmckenzie12



    I have noticed this message above my header on my home page “Deprecated: Function create_function() is deprecated in /home/customer/www/ on line 3”

    What does it mean and how do I get rid of it?


    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Sundar



    In PHP 7.2.0, the “create_function()” is deprecated. So you should use Anonymous Function instead.

    For example instead of something like this:

    $callback = create_function('', 'echo "'.str_replace('"', '\"', $section['text']).'";');

    You should create function like this:

    $callback = function() {
        echo str_replace('"', '\"', $section['text']);

    * Update all plugins & active theme with latest version release.


    Thread Starter leeannmckenzie12



    Thanks so much for your reply.

    I have no idea how to change that? (I am not very good with the technical side of wordpress).

    How do I add what you have mentioned to my site?


    Moderator Steven Stern (sterndata)


    Forum Moderator & Support Team Volunteer

    Hmmm…. the wordpress “root” index.php file doesn’t create an functions. What’s in the file /home/customer/www/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deprecated: Function create_function() is deprecated’ is closed to new replies.