• Resolved Michael Wilson

    (@michael-wilson)


    I was trying to customize the font size in Tag Cloud and foolishly took the advice from a website that suggested I modify the functions.php file which resulted in my being blocked out of my webite and unable to login to to “wp-login”. Trying to do so gets this:

    Fatal error: Cannot redeclare debug_fopen() (previously declared in /www/sites/c0b/861/www.ecospirituality.co.uk/web/wp-includes/functions.php:1133) in /www/sites/c0b/861/www.ecospirituality.co.uk/web/wp-includes/deprecated.php on line 2883

    I have also tried to restore the functions.php by replacing the corrupt file with the original in my FTP but this does make any difference.

    Can someone please help?

    Thank you.

    Mike

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Michael Wilson

    (@michael-wilson)

    Fortunately I save a copy of the original functions.php file before modifying the orginal in Admin, and have now replaced the modified file with the original. However, when I log-in to Admin I get this: have now made sure that functions.php now means that I get this:

    Fatal error: Call to undefined function add_action() in /www/sites/c0b/861/www.ecospirituality.co.uk/web/wp-includes/functions.php on line 51

    So, now what do I need to do?

    Mike

    Try re-uploading all files & folders – except the wp-content folder – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    Thread Starter Michael Wilson

    (@michael-wilson)

    Thank you for getting back to me so quickly. I will try this now and post a message to let you know how I got on.

    Mike

    Thread Starter Michael Wilson

    (@michael-wilson)

    Okay. I have up re-uploaded all files and folders with the exception of the wp-content folder from a fresh download of WordPress. But I still get this:

    Fatal error: Call to undefined function add_action() in /www/sites/c0b/861/www.ecospirituality.co.uk/web/wp-includes/functions.php on line 51

    Is there something else I need to do?

    Mike

    Did you delete the old copies of files & folder before uploading the new ones?

    Thread Starter Michael Wilson

    (@michael-wilson)

    Ahh! No. I’ll do that now. However, I have also just re-upload again and got this:

    Parse error: syntax error, unexpected T_FUNCTION in /www/sites/c0b/861/www.ecospirituality.co.uk/web/wp-content/themes/twentyten/functions.php on line 1

    But will now delete files and folders first.

    Thanks for your support. It’s much appeciated.

    Mike

    Thread Starter Michael Wilson

    (@michael-wilson)

    Okay, I have now deleted all files and folders except wp-content and replaced with a fresh vervsion of WordPress, but still get this:

    Parse error: syntax error, unexpected T_FUNCTION in /www/sites/c0b/861/www.ecospirituality.co.uk/web/wp-content/themes/twentyten/functions.php on line 1

    What else do I need to do?

    Thanks,

    Mike

    Try re-uploading a fresh, unpacked, copy of the Twenty Ten folder to wp-content/themes using FTP or whatever file management application your host provides.
    https://www.ads-software.com/extend/themes/twentyten

    Thread Starter Michael Wilson

    (@michael-wilson)

    Brilliant! That worked. I am now able to logon to my site. Thank you. I really appreciated your support.

    Mike

    No problem. Glad I could help ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal error when editing functions.php file’ is closed to new replies.