How to fix if you have an Parse error functions.php notification, which is usually “Parse error: syntax error..functions.php online..”, it is mostly happened afterย you added any codes to your functions.php incorrectly in your WordPress dashboard.
So let’s say you’ve just installed a plugin, and you followed the instruction to paste some codes in your functions.php file, and you added the code there, refreshing your browser, and suddenly you will get this following message:
Parse error: syntax error, unexpected '<' in /home/webinternet/public_html/(my website)/wp-content/themes/yourthemename/functions.php on line 450
First of all, do not be panic. I know whenever you can’t login to your dashboard and you will just see white screen with above error message, you will probably think your whole blog is broken. No it is not. If your error has error establishing database, then read this link instead.
Read the error message carefully
There are many ways to fix it. Re-read the error message again. We use the example above, it said, inside ../wp-content/themes/yourtheme/functions.php on line 450. Pay attention on the word I highlighted to bold fonts. Notice, “themes” word in path, it means inside your theme.
Important!
If your error message does not contain the “theme” wording, then it is NOT functions.php of your theme. For example, this error support thread is not inside your theme, but insides wp-includes.
Parse error: syntax error, unexpected $end in /home/content/11/79741933/html/youraccountname/wp-includes/functions.php on line 5435
Notice the difference between the bold fonts highlighted text between the first and the second of both error messages. The second one is in your wp-includes/functions.php. It is in fact a different file. So if you read your error message, and you read wp-includes, then you need to upload the fresh functions.php of WordPress, if it does not work, you will need to re-install or manually update your WordPress core files.
But if you read it inside your theme then follow this tutorial.
Try these two methods first
1. First, try download fresh functions.php file of your theme, and upload it to your theme folder.
2. If the 1st method above does not work? Then look for that line error code (in this example, it says line 450), and clean the code.
If two methods above did not work, try this latest method. This is the easiest, especially for beginners is delete or rename theme folder. This tutorial is using this easiest and fastest way.
Last method toย fix this parse error functions.php
Video tutorial:
1. Go in to your cPanel, and then “File Manager” and navigate to where you installed WordPress. Let’s say you install it in the root, so go to the root and look for “wp-content“.
2. Once you find this folder, look for your theme name, and rename or delete it. In this tutorial, I renamed it.
This will switch your WordPress blog theme to the default theme.
I hope this will be a help if you ever encountered this similar problem, and it is always good if you want to modify something, backup your database and theme files to your computer, or backup your website manually without FTP.
I wish I had your tutorial when I started using WordPress ! Back then, I hadn’t even heard of PHP, and, when I first edited some PHP file, errors happened of course, and I got scared… Sometimes, I was shown a broken page instead of an error message : this was even more scary ! Later, I discovered in cPanel a Log icon, which gives access to the error messages.
@Pham-Pham, I understand, i was once new as well.
i felt it is scary indeed when you have error message, i do feel scare too, especially when i restored this website a few months ago ๐
thx. helped
@hary, Glad it helped! Thanks for commenting
I could not get this to work. I tried to edit the function area (in file manager)…only to get this error:
Parse error: syntax error, unexpected ‘<' in /wp-content/themes/wp-clear-basic/functions.php on line 25
When I attempt to edit it, the code is not in the file.
I'm desperate at this point as my site has been down for awhile. I have contacted the creators of my theme (solostream), but no one is answering questions. They all seem to be "away".
When you say that renaming will cause it to revert to the "default" theme, how to change it back to the premium theme I purchased?
Very scary…
Ty, any advice is appreciated.
@Victoria, Hi there,
Yes, by renaming the theme file (in your case, your theme name is wp-clear-basic, you can rename it to wp-clear-basic1 or anything) this will force your wordpress blog to have your default theme. (avoiding white screen)
To change back to the premium theme you have purchased, either you upload the original functions.php of wp-clear-basic, or just upload the whole original copy of wp-clear-basic (i hope you saved one original of your theme in your computer) If not, contact the creator/seller to send you the original files.
Let me know if it works.
Hi Kimi,
It did work but now I have a new error & can’t download any plugins. Can you change my post (site name) a bit? Google is indexing this comment along with my site. Thanks for you help!
@victoria, hey,
I have changed/removed it, please check if it’s ok for you, let me know if i need to change it again.
The problem that you can’t download any plugins are definitely not caused by renaming and re-upload your theme files. It can be caused by anything else.
Hey Kimi,
Thanks for that! Don’t want THAT to get indexed! All of my problems disappeared when I signed up with a new host. Dashboard issues (plugins that were forever in the “loading” status) and the plugin admin are now perfect! No wonder my “other fixes” weren’t working. My pages now download really FAST! So, I am so glad everything is working fine. If anyone has these issues (dashboard plugins not working correctly & plugins for the site are down)…it’s probably the host. Since I’ve already had so many issues with them…not a big surprise. Thanks so much, without your help I would not have made it this far!
@Victoria, No problem ๐
I am so glad you finally found out the reason why you couldn’t install plugins.
I agree, that host plays big part of our site’s functionality.
Best.
Thank you so much for this. I literally did cry when I couldn’t even get into the file to edit it.
@Michelle, you’re welcome, glad you fixed it.
wow..it really shocked me at first.. i was no no no i shouldnt have meddled with that(funtions.php)..haha now thanks to you i can access my site again..THANK YOU =P
@Cedric, you’re welcome.
Editing functions.php is really ok, if you really know in which line you did edit, you can always delete the line through cPanel ๐
THANK YOU FOR THE HELP!!! I thought I lost my entire site, but, was able to fix the error thanks to you!!!!!
You’re welcome, the problem was solved!
Best regards.
Hey Kimi,
I’m freaking out I have this message because I edited my function.php, but I also backed my function.php up and so when I got the error I pasted the saved function.php code in and it STILL has the error? I don’t understand why? The thing is I have a slightly different error to you.
Parse error: syntax error, unexpected $end in /home/…/public_html/wp-content/themes/renegade/functions.php on line 353
I don’t want to have to change the theme name folder because then I have to redownload the theme and lose all my changes. Is there nothing else I can do??
Jason, Glad you got your dashboard back, Enjoy Aussie ๐
i freaking love you. i almost deleted my entire site and months worth of work (just started…of course i’m a foolish girl and didn’t back up ANYTHING. dumb) and then came across this post. totally forget that cpanel had all my files there and that i could edit to a diff theme!
you rock, i love you, and once i’m not poor i will donate hundreds of dollars.
thank you again!
Hey Courtney,
So glad that it is fixed! Yes, i hope you will be rich one day, and still remember me ๐
Thank you for the nice words!
Kimi.
hi, I have a big problem with my functions.php file.
everything I add to it appears in webpage above the header area. I copy the codes from websites from codex wordpress files or… but all codes will be printed in website! can you tell me whats wrong?!
Hello there,
You should not copy code from any websites to yours, because your theme has different codes and css file content.
To get it back as before, upload your theme backup, i hope you still have one. If not, download again.
I hope this helps.
This is definitely a great help! I experience this problem awhile ago but because of your helpful article, I was able to recover my blog.. Thank you very much!
Hello Krishna,
Glad it was a helpful post for you, thank you for the nice comment!
This was great precise info and I was able to fix my problem immediately! Thanks!
Lena,
Glad it was useful, thanks for leaving your nice comment!
Kimi.
Kimi, Thanks a million, I was trying to add a favicon logo to my site and messed something up in my theme editor. Your directions were clear, concise, and easy to follow. Thank You again… Justin
Hi Justin!
Most welcome, I am glad it was easy to follow..
Kind regards,
Kimi.
You are a life saver! Thanks so much!!
I really feel terrible, I was trying to add a facebook like button when I got a parse error. Now my site is totally blank. I did try and follow your instructions but still the page is showing a white screen. I am scared that I have lost all my work done for the last 4 months. I renamed my default theme page. I even erased the error from the cpanel.
Atula,
Mind to share you site URL? without seeing it, I can’t actually check.
It is very important to always backup your site before installing plugin.
thank you, thank you! You totally just saved me hours of time and headache. I’m very new to WP and thesis and so when I got the error message and the whole site froze up, I got scared … and then I found your site and you saved me. thank you!
I was changing the theme and the preview worked fine now I cant even get to my dashboard.
Any help is appreciated. ๐
Thank you so much Kimi. I uploaded the original functions.php file of my theme through ftp and got back my dashboard and blog.
However, when I tried to rename my theme earlier, I got my dashboard back but not my site.
Thanks once again for your help.
Hi Chandan,
I am glad it worked out!
Cheers,
Kimi.
THX a lot!!! ๐
Thank you
Johan
hi, when i type my site, it appears like this, Fatal error: Cannot redeclare __popular_posts() (previously declared in /home/bardiaju/public_html/wp-content/themes/state-of-mind/functions.php:208) in /home/bardiaju/public_html/wp-content/themes/state-of-mind/functions.php on line 457,
so can u pls suggest me how can i fix this, i looked in cpane, but not sure from which part i can fix, can u pls suggest me, thanks
Hi Kumar,
Welcome to my blog
Have you watched the video actually? because that’s the fix.
Or the fastest way, login to your cPanel and delete the state of mind theme folder, it will be fixed.
I hope this helps
Kimi.
I deleted my theme where the error existed and the error is still there!!!!!
Without knowing your site, I can’t help much ๐
Woah… i got this error message…
im so scared..
i search immediately for the solutions.
lucky to found this one ๐
THANKS FOR THIS WONDERFUL TUTORIAL.
hi, i deleted but still appears with another one, can u pls suggest me thanks
hi, i deleted but still appears with another one, can u pls suggest me thanks, it appears like this now
Fatal error: Cannot redeclare __popular_posts() (previously declared in /home/bardiaju/public_html/wp-content/themes/wp-andreas09/functions.php:523) in /home/bardiaju/public_html/wp-content/themes/wp-andreas09/functions.php on line 764
so, if i delete this themes, i wont have left another one, so can upls suggest me, if there will be big problem,, if i delete this theme again,
i have some themes but in my desktop,
thanks
hi, Kimi, thanks for your help, yes i am able to avoid the problem, and fixed it thanks so much again !
im a complete newbie with php, website development, ftp servers and such. what is cpanel exactly? how do i get it on my computer so i can access the files? is there any way i can access the files without using cpanel?
this is the error im getting:
Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /home5/aezincor/public_html/aezberkeley/wp-content/themes/platformpro/functions.php on line 19
Thank you! Awesome and informative post โ helped me fix the problem right away. ๐ (It also helped when you wrote โDONโT PANIC!)
Thank you so much for this tutorial and easy to follow video, I managed to fix my parse error with your help and I am hopeless when it comes to things like these! I’m so grateful, thank you so much!
TNX very much. u saved my life!!!
Thank you so much for this! It was very easy to follow and luckily I was only in a full blown panic for a few seconds before I found this tutorial! I appreciate your help getting my site back ๐
Hello
i have read and followed your instructions but i am struggling the last two days and i cannot understand what is happening.
The error message i am getting is: ‘Parse error: syntax error, unexpected ‘}’ in /home/instate/public_html/wp-content/themes/striking/functions.php on line 20′
So i tried to go to this file path in order to change the name of my theme (striking) as per your instructions or to change the ‘functions.php
However this filepath does not exist in my mac!
I have a folder where my wordpress files are saved (it is in a different file path) and i tried to change the ‘functions.php’ of this folder or to change the name of the theme but nothing is happening…
Could you please help me because i have no clue what else i can try?
Hello
Welcome to this blog ๐
I have checked your site and the problem still remains..
I don’t really understand about what you said, “However this filepath does not exist in my mac!” because the filepath should be in your webserver/cPanel or webhost.
Login to your cPanel, look in wp-content/themes and, delete the folder inside themes, called, “Striking” as the current theme which causes the problem, and it will be solved.
Let me know if this helps
Kimi.
Thank you so much for your help!
It was my mistake (proving my lack of experience!) as i was looking for the file path in my hard disk:)
Thx again, you saved from hours of pointless efforts!!
My pleasure instate, glad it is sorted!
Kind regards
Kimi
i’m so glad i found solution,i have do the same problem thank’s for you
explain
Hi Kimi,
Thank you very much. That was very useful. I really got tensed when I saw the message but it is all sorted now ๐
People are glad , i’m too glad because of sharing & work experience of yours . . . I almost got a heart attack on my brains . . . completely fused . . . after just messed with one single line of function.php menu implementation .
thanks . . . Breathing now . . .
Hi everybody!
Actually I come frome Hungary, so my english is not the best. Sorry about that.
That’s my problem. I have no idea what can I do with that. I tried a houndred times to load up the files from wordpress file, to website. But it wasn’t worked! Always the same problem. ๐
Please help me! ๐
Warning: Cannot modify header information – headers already sent by (output started at /var/www/clients/client1233/web6724/web/wp-config.php:1) in /var/www/clients/client1233/web6724/web/wp-includes/functions.php on line 3371
Hi Sefi!
Welcome to my blog, Hungary is a beautiful country, I was in Balaton sea ๐
For your problem, if you feel you have not edited some files, that caused by your webhost. Contact your webhost and they will give you a better answer.
I ever had that problem, and it was gone from alone.
Best regards
Kimi.
Hi Kimi! ๐
I tried to contact my webhost, but they couldn’t help! I’m a little bit pissed off, becouse I can’t do anything. I send them a few letter since 01.02. and now, almost two weeks later, they could’n answer!!
http://www.freeweb.hu that’s my webhost. And they changed the (I don’t know the word) to a hosting service. So I paid them. And I just don’t know WHY I can’t install the word press to my website!! I have no idea!! ๐ :'( (my website: kertbaratok-paks.fw.hu)
Please give me some tips!! ๐
Hi Kimi,
Stumbled upon your useful blog when i desperately needed to fix my website that was down. Appreciate your explanation here.
I hope that you will be able to give some useful feedback to me as I m having a slightly different issue – i encountered parse error pointing to functions.php in twentyten folder inside theme folder but i m actually not using the twentyten theme, i m using another theme. To my surprise, all the files in the theme folder that i m using is empty. I m not sure whether my website is hacked because this happened overnight and i have not deleted any files.
How can i solved the problem? Really appreciate your help. Thx so much!
Hi Judy!
Welcome to my blog. To be honest, I have never encounter this issue.
If you are being hacked, only your host can help, by checking the logs file.
I suggest you to ask your web host about it.
I hope it will be fixed soon
Ok, thanks a lot. Keep up the good work in your website. It is useful ๐ to newbie like me.
Most welcome Judy!
Thank you very much for the nice words, truly appreciate it! ๐
Dear Kimi,
Iยดm having this very same problem at the moment. I was editting functions.php as I wanted to put Facebook like buttonยดs codes in it and my dashboard went blank since then. I have tried your suggestions, deleting the theme (coraline) and also renaming it (coraline1). Yet, Iยดm still cannot access to my dashboard. It says,
Index of /wp-admin
Parent Directory
error_log
Apache Server at http://www.sabororiental.com Port 80
Can you please help? Iยดm new in WP.
Thanks in advance!
Hi Magdalena,
It shouldn’t show only the parent directory folder.
I have visited the URL you pasted, but it redirected to BlueHost.
Is your domain by any chance expired or is it really new?
I would contact your host.
Keep me updated
Kimi.
Wow, thanks for a prompt response. I really appreciated!
I will write to my host. My account is really new, I have just signed up 2 weeks ago.
I will keep you updated.
Thanks again!
Magdalena
Dear Kimi,
My host company has fixed the problem but I had to reinstall WP and started from 0 setting the blog to look like before.
I have learnt my lesson:-(. Tomorrow Iยดll get backups from my files with your tutorial. Thanks for your kind help!
Magdalena
Dear Magdalena,
I checked your site, it’s sad, that you have to reinstall WP, your host should have the whole site backup though…
But if it’s a new site, to prevent something like this happen, it’s best to backup your database regularly, and “wp-content” folder to your computer. (backup, not delete!).
If you want to use plugin: https://www.wpvidz.com/wordpress-database-backup-plugin-tutorial/
If you backup manually (database + wp-content folder), like I always do regularly, like once a week:
https://www.wpvidz.com/backup-wordpress-database/
Best wishes
Kimi.
Oh Once more,
I like your name, it’s like my mom’s name ๐
Regards from Germany
Kimi
Thank you!
Most welcome!
i upgraded my wordpress version. mey be the theme is not compatible with the new version.
how can i go into cpanel ๐ก
i tried to access the database using filezilla but it gives an erro
” Login authentication failed ” although the user name and password are correct.
i’m a pro noob. please help
Hello there,
To access your cPanel, you can ask your host, who is your host? For example if you use HostGator, you can ask the login and password of your cPanel if you forget it.
Usually, you can also try, yoursite.com/cpanel
To use FileZilla, the configuration settings must be filled correctly, otherwise it will not connect to your server.
I would contact your host to access your cPanel first.
Kimi.
Oh my god thank you so much!!! I almost died of a heart attack and came across your page. I am your fan forever. Thank you and it worked!!!
Great thanks for the solution ๐
how do i add a google tracking code? what are the exact steps?
Thank you so much for this post. I just got a parse error and was petrified I had done something wrong! It didn’t change even when I was copying the code from original file. Your re-uploading the functions file saved me! Thanks again! A very useful post. =)
God bless you! You saved my life :B ๐
Thank you very much! You saved my day!
Thank you thank you thank you!! Ugh I was soooo mad at myself.
Thanx so much!
Hi!
I had a similar parse error and i followed your instructions to delete the line that had problems first. I did so and when I hit refresh it shows me another parse error for the next line. I thought I would have to delete every line one by one, so I tried the second method. I renamed the theme and when I refreshed my page was blank. Then I deleted the theme thinking iy would aplly the sample theme as you said, but it still showed a blank page with my website adress in the browser. I don’t know what to do! I’m scared to death!!!! Please help me!!
Hi Andy,
I just checked your site, and it appears ok to me. Try to clean your browser cache.
Kimi
Thanks a lot!You tips just worked for me.I was facing the problem and i was just scared.Then searching in the Google i have got your blog and the tips just worked for me.Thanks for your helpful tips.I am feeling better now.Thanks!
Thank you for guiding me through saving my site. Woooooooooooo!!!
This post removed all the stress, confusion, helplessness. Thanks and God bless you.
Please help! Your site has been the most helpful one I’ve found so far, but I still can’t get my blog back! I’m using DreamHost, so when I got to the “File Manager” part of your instructions I was lost. I don’t even know what FTP is, but I see a lot about it. I installed a backup plug-in with google drive a couple weeks ago. The error message I’m getting is:
Parse error: syntax error, unexpected ‘}’ in /home/prayersnapples/prayersandapples.com/wp-content/themes/freedream/functions.php on line 10
The problem came after I tried to follow a dumb tutorial online for adding a favicon – I added the following text to my functions.php and that’s when everything went wrong:
function my_favicon() { ?>โจโจ<?php }โจadd_action('wp_head', 'my_favicon');
I can't even access my login and (as you can tell) I'm about to have a heart attack ๐ You seem to really know what you're talking about, if you could offer me any help or assistance I would appreciate it! I don't know how to get around in DreamHost and I'm just sitting here crying! Thanks so much!!
Hi Jessica,
I have checked your site, it’s an error in functions.php file of your theme.
1. Delete your current theme, which is stored under “freedream” folder. Delete this folder, ONLY freedream folder. Login to your cPanel, click file manager, and IT should be inside wp-content/themes/freedream
Doing above should switch your site to the default theme.
2. You can then download your current theme again (freedream) and use it again if you like.
To add favicon, you can simply upload your favicon to your file manager, no need to add any code, this will work too.
Let me know if this helps.
Kimi.
Thank you so, so much! That worked!!! Thank you again ๐
Hi Kimi,
I send you message through contact form asking my problems.
I have made edit on functions php (without having backup ๐ ) but then I cancel the change.
The problem is I can not log out, so I try to restart my computer but then I even cannot log in. Here’s the message every time I try to log in:
Warning: Cannot modify header information – headers already sent by (output started at /home/oktorian/public_html/wp-content/themes/bloggie/functions.php:282) in /home/oktorian/public_html/wp-login.php on line 368
Warning: Cannot modify header information – headers already sent by (output started at /home/oktorian/public_html/wp-content/themes/bloggie/functions.php:282) in /home/oktorian/public_html/wp-login.php on line 380
Warning: Cannot modify header information – headers already sent by (output started at /home/oktorian/public_html/wp-content/themes/bloggie/functions.php:282) in /home/oktorian/public_html/wp-includes/pluggable.php on line 680
Warning: Cannot modify header information – headers already sent by (output started at /home/oktorian/public_html/wp-content/themes/bloggie/functions.php:282) in /home/oktorian/public_html/wp-includes/pluggable.php on line 681
Warning: Cannot modify header information – headers already sent by (output started at /home/oktorian/public_html/wp-content/themes/bloggie/functions.php:282) in /home/oktorian/public_html/wp-includes/pluggable.php on line 682
Warning: Cannot modify header information – headers already sent by (output started at /home/oktorian/public_html/wp-content/themes/bloggie/functions.php:282) in /home/oktorian/public_html/wp-includes/pluggable.php on line 876
Can you help me out?
Thanks
Hello Okto,
If you can’t login, can you access the cPanel with FTP programs? and then delete the “bloggie” themes folder, you can install later back then, but first delete that folder, ONLY bloggie folder.
If you can’t access cPanel with FTP, you have no other choice other than contacting your webhost to help you.
Kimi.
Hi Kim,
I’ve followed your tip here. I access my cpanel and delete my “bloggie” theme folder, etc.
Conclusion is it fix my problem. Thanks
*I guess I am another victim of dumb tutorial online .. thanks for your tip here.
Salamat.. (Thank You) Now I can go to sleep. ^______^
Useless, doesn’t work
Hi Kimi,
Thanks for your expert suggestion. It’s solved now. Frankly speaking I have new problem, is there any way I can ask directly?
Thanks for your attention
Hello Okto,
I really would like to help anyone who contacts me, but I rarely have time as I have 2 little kids, and a daily job ๐
Therefore, I suggest you to visit wordpress.org forum, as it’s the official page for helps.
Thank you for your kindness
Kimi.
Hi Kimi,
I’m late to the party but thank you, thank you, thank YOU for this post! I’ve literally just cried with happiness (after the mild heart palpitation!).
LIFESAVER!
I really thank you for sharing for this content i fix my wordpress blog.
Hi Kimi,
I hope you can help…
I added some code in my PHP functions for WP Lifestyle theme and now cannot log in. I have the folowing error message: Parse error: syntax error, unexpected end of file in /homepages/23/d182009826/htdocs/wordpress/wp-content/themes/lifestyle/functions.php on line 163
I have managed to access my cPanel via my host 1&1 and am sitting looking at pages of code with no idea what to do next!
I did manage to delete the extra code I added to Functions PHP that started this whole problem and have saved that code in a Word document but i don’t know what to do next or how to do it. I read your above blog and you said: “download fresh functions.php file of your theme, and upload it to your theme folder”
Forgive me but I don’t know how to do that.
Help please!
I’m so worried that all my work will be lost on my website.
Thank you x
Parse error: syntax error, unexpected ‘<' in /home/nykall/public_html/wp-content/themes/vibrant/functions.php on line 48
hello i was wondering if u can help me fix this on my site.. can't seem to log in to filezilla to fix this. Please help!!
Hello,
You should be able to use FileZilla, check the pass and username again, however, alternatively, you can also login via cPanel, and delete the theme folder, called, “vibrant”.
Then, you can upload or install the vibrant theme (original) again.
Kimi.
Thank you very much! Your a life saver! I really thought my whole website was broken but this fixed it perfectly. Instead of deleting the theme I just edited the functions.php through my cpanel!
Thanks again, helped me so much! :):):):):)
Worked like a charm. Thanks!
You are fantastic! Thank you so much. I had the same problem, totally getting stressed. With this tutorial I fixed the problem. thanks again!! ๐
Thankyouthankyouthankyou! I can’t remember the amount of times I’ve completely fluffed up WP, but you don’t learn if you don’t tinker with code! ๐ As I always say, if it ain’t broke, then break it!
Thanks again.
Thank you so much for this post. It’s good to be reminded to not start panicking. Even though aaaaaaarrrrghhh! White screeeeeen!
Anywayโฆwe only tried changing the font of our blog yesterday and somehow something got mixed up and put in the wrong place probably and now the screen appears to be white with a error message telling us that there’s an error in the functions.php.
So we tried a couple different things. First we replaced the functions.php that apparently had the error in it with the original theme functions.php. No change.
Now we deleted the whole theme folder in wp-content/theme. No change.
It just doesn’t make ANY sense and I have no clue what to do now ๐
Any advice would be amazing.
Hello Mel..
It would be easier if you tell what url your site is?
Kimi.