WordPress.org

Forums

[resolved] Fatal Error in php, Now I can't login / access my dashboard (8 posts)

  1. kosakra
    Member
    Posted 9 months ago #

    Hello,
    I'm fairly new to WordPress and I took over a site for a school publication. I was trying to add a search bar to homepage and ended up making a mistake while adding code to the functions.php file.
    Now I can't access the website as it is giving me "fatal error: call to undefined function". I can't even get back to the dashboard as going to the website's wp-admin or wp-login is giving me the same error. Is there anyway I can get to my dashboard so I could simply delete the code I added to the functions.php
    Thanks a lot
    PS the site is http://www.bullandbearmcgill.com/wp-admin

  2. donhoward
    Member
    Posted 9 months ago #

    If you have a fresh backup of the theme you could replace the functions.php in the theme that is activated using FTP. Please make certain you keep a copy of the functions.php file that you are removing just in case you need to go back to it.

    An alternate method is to rename the theme's folder by adding "old" to the beginning or ending of the name. That will cause WordPress to revert to the default theme and you will be able to access admin.

    Hope that helps,
    Don

  3. kosakra
    Member
    Posted 9 months ago #

    Hello Don,
    I was doing the editing directly from the web so I don't have an back up of the functions.php
    For the alternative method, how can I access the theme folder so I can rename it? I am really new to this so I'm a little lost on how to do that

  4. donhoward
    Member
    Posted 9 months ago #

    You will need to have FTP access, or access to the File Manager on the hosting service.

  5. kosakra
    Member
    Posted 9 months ago #

    I'm getting the FTP login info now so I can edit the function.php
    Thanks a lot Don

  6. donhoward
    Member
    Posted 9 months ago #

    Please let us know when it's worked out.

    Don

  7. kosakra
    Member
    Posted 9 months ago #

    Hello Don,
    Everything is fixed. All I had to do was log in using Filezilla to get FTP access and I deleted the tiny piece of code I messed up.
    Again thanks a lot Don !

    Kosa

  8. donhoward
    Member
    Posted 9 months ago #

    You are very welcome! I'm glad it all worked out for you.

    Don

Reply

You must log in to post.

About this Topic