-2

I knew I made a syntax error or something which Wordpress showed error after I added code to functions.php :

Parse error: syntax error, unexpected 'Lucida' (T_STRING), expecting ',' or ';' in /home1/[name]/public_html/wp-content/themes/[name]/functions.php on line 49

The problem now is that, how am I supposed to rectify the problem when I tried clicking on any part of my website now, it will just show that error message without allowing me to even edit back the code?

I hit the 'back' button, and managed to go back to the theme editor, and removed all changes, to restore to its default and click 'update file'. It still showed me the same error.

I can't even enter my admin page of the Wordpress.

Can anyone help on this? Nothing I can do now?

I FIGURED OUT THE SOLUTION

I'm tired of waiting. I've fixed it on my own. Looking somewhere at Wordpress.org support forum and there were people suggested to ftp to the website, and edit back the functions.php file.

So the steps:

  1. If you have control panel on your web hosting, you can either use File Manager on your control panel or ftp to your website using ftp client such as FileZilla.

  2. Remove whatever faulty from the functions.php, and if you have to, restore to its default.

  3. Click 'Save' and you are done. My problem fixed.

  • Post your solution as an answer, and then -- once you're able to -- mark it as the accepted answer. That way, others having the same problem can find your question+answer when they search. – Pat J Feb 25 '14 at 3:31
  • 1
    Also: There are many ways to edit WordPress files; the Theme Editor might be the worst possible way to make changes to your PHP files. – Pat J Feb 25 '14 at 3:34
  • 1
    Yeah. I was trying to. But I'm new to here, so I need 10 reputation points to do so. – Charles T. Feb 25 '14 at 3:38
1

Download the theme file per SSH or FTP, edit it locally, and upload it again.

General advice: Never edit files on the production site. Run a local test installation, edit everything locally. Test it, then put it on the server.

  • Hi there, I'm new to Wordpress. Just realized I made silly mistake. I've fixed it anyway. Regarding the local test installation, is there steps you can point me to ? – Charles T. Feb 25 '14 at 3:24
  • charles, there a quite a few very good tutorials on installing wordpress locally with pictures and all to guide you through the process. I'm using XAMMPLITE to run my wordpress install locally. Just do a google search on "installing wordpress locally with xammp" – Pieter Goosen Feb 25 '14 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.