Messed up php file
I’m in a bit of a panic. I added something to the functions.php file of my WordPress theme, decided it was a bad idea and deleted it, and then when I saved I got this message: Parse error: syntax error, unexpected ‘(‘, expecting T_VARIABLE or ‘$’ in /home/content/e/s/c/esco1/html/ITALKREALESTATE/wp-content/themes/amdhas/functions.php on line 62
I didn’t touch any of the original code, and I even downloaded the theme and copy/pasted the functions.php file into the one on my dashboard, but it’s still doing that no matter what I do or what I click on.
What did I do???
You’ll need to replace that file using FTP or Cpanel to access the files on the server. Do you have either of those set up with the hosting company?
I don’t know, I don’t know how to do any of that. What happened?
Changing functions files is a risky proposition – a small mistake can crash a site. Once it’s crashed, you can’t undo the changes via the dashboard.
Looks like the site is hosted on GoDaddy? In that case, here’s the info on FTP –
Once you get that set up, you’ll find the file here:
wp-content themes amdhas functions.php - REPLACE THIS FILE WITH A NEW COPY
Okay…the guy I’m working with hasn’t given me access to that, so he’ll have to do it. There’s no way it can be done through the WordPress dashboard?
Yeah, but don’t feel bad about it – happens to everyone :). And it’s fixable.
I’m having the same problem – bad php file crashed the site. But I’ve downloaded the file from wordpress.org and uploaded it to my site several times now, and I’m still having the same problem. I’m uploading it to the correct place. The file from wordpress.org and the file on my server are exactly the same according to Unix diff. Is there something I need to do to “refresh” the theme? Or can I take an entirely different theme, not broken theme and upload it to – well, I don’t know where – to switch my active theme?
- The topic ‘Messed up php file’ is closed to new replies.