Support » Fixing WordPress » 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???

Viewing 10 replies - 1 through 10 (of 10 total)
  • WPyogi

    (@wpyogi)

    Forum Moderator

    Hi again,
    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?

    WPyogi

    (@wpyogi)

    Forum Moderator

    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.

    WPyogi

    (@wpyogi)

    Forum Moderator

    Looks like the site is hosted on GoDaddy? In that case, here’s the info on FTP –

    http://support.godaddy.com/help/article/4881/finding-your-hostingftp-login-or-user-name

    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?

    WPyogi

    (@wpyogi)

    Forum Moderator

    Not if it’s crashed – looks like it to me :(.

    Of course. Live and learn. Thank you!

    WPyogi

    (@wpyogi)

    Forum Moderator

    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?

    Thanks,
    Dervila

    Dervila – Make your own topic please. (you’ll want to edit the theme in the wp_options table – change template and stylesheet to the folder name of the theme you want to switch to)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Messed up php file’ is closed to new replies.