Support » Fixing WordPress » URGENT: Fatal Error on my site

  • Resolved siumaiii

    (@siumaiii)


    Hey guys
    My site is suddenly only showing this error when I was trying to revert changes on the function.php back to original:
    Fatal error: Cannot redeclare lang_setup() (previously declared in /home/content/e/n/k/enk3munky/html/wp-content/themes/salient/functions.php:16) in /home/content/e/n/k/enk3munky/html/wp-content/themes/salient/functions.php on line 2856

    How can I fix this? I can’t even go to the dashboard or anything right now

Viewing 6 replies - 1 through 6 (of 6 total)
  • You’ll need to use either an FTP program or your hosts cPanel to gain access to your file directories.

    Once there, browse to the wp-content/themes/ directory.
    Look for the directory named salient and delete it (make a backup if necessary).

    This will force the theme to deactivate (defaulting to the 2014 theme).. and restore your access to the admin panel.

    This is a main reason why we never manually edit core theme files. Instead, please consider using a Child Theme.

    Alternatively… you could download the “Salient” theme again… and get a fresh copy of it’s functions.php file (one you have not modified). Take this original, and copy it to the wp-content/themes/salient directory… overwriting the original (make a backup if necessary).

    Thread Starter siumaiii

    (@siumaiii)

    Thanks a lot Josh!
    Just did that and the site is back up! Not sure what went wrong cuz I was just pasting the original functions.php code and the site just died. Pasted the exact same thing back through my hosts cPanel and it worked fine. Anyways thanks again 🙂

    Glad you got it working 🙂

    I was just pasting the original functions.php code and the site just died.

    What program are you using to edit the file? If you are not using a code editing program, it may get saved with extraneous formatting. For example, it is NEVER a good idea to edit code with Microsoft Notepad or Microsoft Word. You should use something like NotePad++.

    Thread Starter siumaiii

    (@siumaiii)

    ah you are probably right about the code editing program. I copied the original code from TextEdit and probably had weird formatting. Thanks a lot! Lesson learned..totally saved me 🙂

    TextEdit adds extra symbols that shouldn’t be there. It is best to use a program made for code editing such as NotePad++ or Sublime Text.

    🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘URGENT: Fatal Error on my site’ is closed to new replies.