WordPress.org

Ready to get started?Download WordPress

Forums

Messed up php file (11 posts)

  1. hannahsigmon
    Member
    Posted 8 months ago #

    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???

  2. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    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?

  3. hannahsigmon
    Member
    Posted 8 months ago #

    I don't know, I don't know how to do any of that. What happened?

  4. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    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.

  5. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    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
  6. hannahsigmon
    Member
    Posted 8 months ago #

    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?

  7. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Not if it's crashed - looks like it to me :(.

  8. hannahsigmon
    Member
    Posted 8 months ago #

    Of course. Live and learn. Thank you!

  9. WPyogi
    Volunteer Moderator
    Posted 8 months ago #

    Yeah, but don't feel bad about it - happens to everyone :). And it's fixable.

  10. Dervila
    Member
    Posted 8 months ago #

    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

  11. 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)

Reply

You must log in to post.

About this Topic