Support » Themes and Templates » Syntax error blocking access to WP editor

  • Resolved wperic


    I put a new function into my child functions.php file, but it apparently has a syntax error. Now WP won’t let me back into the editor to fix it. Each time I try to access the editor from the Dashboard I get an error message in my browser. How do I get back to the editor to fix the error?

    I suppose I could try to FTP in to my web host and upload a fix, but I would think there should be a way in via WP.


Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Andrew Nevins


    Front-end developer

    Could you post the syntax error and the line of code in which it refers?

    It’s gone–I did go in an fix the code via FTP. Basically I had missed a semi-colon and gotten some of the nested quotation marks wrong. Once I fixed those by going the long way around, I’m OK. But I’m still thinking there should be a way in from within WP.


    Hi, i’ve just stumbled upon your problem and it seems a lot like mine – happy that you fixed it, i just wanted a bit more detail about how you did it. If I log into my web hosting service or through filezilla, will i be able to fix the syntax problem?

    I know which file is corrupted and I know what to do, will I be able to download it and change it? If I can only acess it through filezilla, will it give me access to pages like themeoptions.php? I’m scared to do anything because I’m afraid I’ll make things worse.

    provided that I correct it all and reupload the right file, will the site be back on?

    I was actually able to log into a file editor on my hosting site and fix it. But to do it by FTP I’d suggest this:
    0. Connect to WP hosting site with FTP. Either make copy there if Filezilla does that or download the corrupted file and make a backup on your desktop (or wherever).
    1. Make a copy of the corrupted file (corruptedfile-copy.php or whatever).
    2. FTP the original corrupted file back to your desktop with Filezilla.
    3. Fix the original on your desktop.
    4. FTP the original back to your host, choosing to overwrite the original (that’s why you have the copy up there–insurance).
    5. See if the problem is fixed.

    I also discovered that if you use the back button on your browser right away when you get the error message, it does seem to take you back to the guilty page in the WP editor.

    [Ignore–I edited the previous.

    Thank you so much!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Syntax error blocking access to WP editor’ is closed to new replies.