WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] admin and site has gone blank !! (25 posts)

  1. fz11
    Member
    Posted 1 year ago #

    Hello
    Appreciate help and advise with my issue. I was trying to add/edit part of a code on the functions php where suddenly the site went blank and I could not get back into my dashboard or re log in !!!!

    How can I have access again without losing much data as there was a lot of customisation to the original theme.

    Thank you

  2. This is one of the main reasons we NEVER edit core files. For the love of god.. please use a child theme!!

    What you need to do is get a fresh copy of your theme's functions.php file. Then, you will need to use either an FTP account, or your hosts CPanel to gain access to your file directories.

    Lastly.. you will want to navigate to where your theme files are located... and upload the new copy of the functions file... replacing the current one.

    EDIT: You might want to make a backup of the "messed-up" functions file.. so that you have a reference of the modifications you made. Then, create a child theme, create a custom functions.php file.. and work from there.

  3. alieneila
    Member
    Posted 1 year ago #

    Add the following to the top of wp-config.php right after the opening <?php to turn on displaying errors. It should then display whatever error is preventing your site loading correctly.

    error_reporting(1);
    @ini_set('display_errors', 1);
  4. fz11
    Member
    Posted 1 year ago #

    thank you so much for the reply.

    I was only following instructions from theme developer support to modify the theme.

    I should also add I am a newbie and need to ask the following:

    1.I have a copy of the functions theme on note pad. what do convert it to in order to upload?

    2. I use cpanel, where would I locate current functions.php

    3. will all the changes still be on the current functions php?

    Many thanks

  5. fz11
    Member
    Posted 1 year ago #

    how and where do I open wp-config.php ???

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    I was only following instructions from theme developer support to modify the theme.

    Did you ask him/her to help with this ?

  7. alieneila
    Member
    Posted 1 year ago #

    It should be in the root folder where wordpress is installed. If you're using cpanel to access /wp-content/your_theme/function.php, wp-config.php will be before /wp-content/

  8. fz11
    Member
    Posted 1 year ago #

    ok great I located he functions php and config php

    I have downloaded the current functions.php an just re edit manually upload and swap with existing one? what format does it have to be?

    my theme support should come back to me in the morning

  9. alieneila
    Member
    Posted 1 year ago #

    in cpanel you should be able to edit the file directly and then save it or replace the file with the edited one... as mention though by Josh, make a backup copy of the file before overwriting the one on your server.

    How were you accessing the file to make the modifications?

  10. fz11
    Member
    Posted 1 year ago #

    someone else has done the modifications

    on cpanel there is editor and code editor an also encoding check, do I disable?

  11. fz11
    Member
    Posted 1 year ago #

    for backing up I can just copy the file onto a folder right?

  12. alieneila
    Member
    Posted 1 year ago #

    no don't disable anything in your cpanel. And yes copy the file to another folder to back it up.

  13. fz11
    Member
    Posted 1 year ago #

    it gives me the option to copy in the wp content of my theme. or do i copy somewhere else

  14. alieneila
    Member
    Posted 1 year ago #

    Download the file onto your computer to back it up and save it somewhere it'll be safe. Then use cpanel's editor to edit the original php file you backed up and save it =)

  15. fz11
    Member
    Posted 1 year ago #

    thanks
    ok I edited the parts where I made the changes but still getting a blank page!?!

  16. fz11
    Member
    Posted 1 year ago #

    27-Oct-2012 22:02:45] PHP Parse error: syntax error, unexpected T_STRING, expecting ')' in ....../functions.php on line 95

    this was emailed from my hosting company.

  17. alieneila
    Member
    Posted 1 year ago #

    Without being able to see the contents of that file, I can't tell you exactly where or what is wrong... but the above error message tells you the basic problem. On line 95, a ) is expected somewhere.

    If you add the lines I gave you above to your wp-config.php file, it'll display the errors like your hosting company sent you.

  18. fz11
    Member
    Posted 1 year ago #

    ok i will add now

  19. fz11
    Member
    Posted 1 year ago #

    it gives me the same error
    but I cant see any error on line 95 unless blank spaces count as lines too !:)

  20. alieneila
    Member
    Posted 1 year ago #

    paste the entirety of your functions.php file at http://pastie.org/ and share the link

  21. fz11
    Member
    Posted 1 year ago #

    I got it back
    thank so so much fr your help

    I just deleted the code :))))

    can relax now :)

  22. fz11
    Member
    Posted 1 year ago #

    honestly you and josh both have been great help.

    wish i could buy u a drink :))))

  23. alieneila
    Member
    Posted 1 year ago #

    lol, always a way to buy me drinks =P

    No problem though, I was bored today so just started answering questions in these forums =)

  24. Sorry I missed out on all the fun ;) Had to go and do some stuff with the kiddo.

    Glad you all got it sorted out!!

    @ fz11,
    Don't forget to mark your thread as resolved.

  25. fz11
    Member
    Posted 1 year ago #

    Done thanks

Topic Closed

This topic has been closed to new replies.

About this Topic