• Resolved Beth

    (@pedalkraft)


    Hi,

    Apologies for asking what others have asked – I took advice from another forum post and added some code to a site’s functions.php file and now have a fatal error which means I’m shut out of WP admin.

    Parse error: syntax error, unexpected ‘<‘ in /var/sites/l/lepetitartist.co.uk/public_html/wp-content/themes/wpex-ultra/functions.php on line 74

    Have seen the advice here on this thread:
    https://www.ads-software.com/support/topic/fatal-error-when-editing-php-file?replies=11

    Which I will do – but before I do that I would like to save the custom CSS file as I’ve made a lot of customisations there which I don’t want to lose.

    However I can’t find this file anywhere! Can anyone tell me where it is?

    Thanks!
    Beth

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Beth

    (@pedalkraft)

    If it’s part of the site content then presumably I won’t lose it when I remove all the non-content files and re-upload them? Just don’t want to risk losing all that work.

    However I can’t find this file anywhere! Can anyone tell me where it is?

    Not sure exactly what you are looking for…did you use a custom CSS plugin, a theme included CSS option? It is likely in the db and either created on the fly or that CSS is inserted into the head….does the site itself still load…can’t you just grab it from there, or here:

    https://validator.w3.org/check?uri=lepetitartist.co.uk&charset=%28detect+automatically%29&doctype=Inline&group=0&ss=1

    ?

    Thread Starter Beth

    (@pedalkraft)

    Thanks for the fast response!

    It’s a theme that includes a custom CSS option.

    The site doesn’t load – every page front or back end just gives the error message. (Oddly, there is no ‘<‘ at all on line 74..!)

    I can’t find my custom CSS via the link you sent – the code given is not my custom CSS.

    Thanks,

    Beth

    Thread Starter Beth

    (@pedalkraft)

    I’m going to accept losing my customisations and re-do them – it’s more important to get the site up and running again as I’ve built it for a friend and she was hoping to work on it herself today!

    So coming back to Emsi’s advice here:

    Try re-uploading all files & folders – except the wp-content folder – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    By ‘fresh download of WP’ does this mean reinstalling WP?

    Thanks,
    Beth

    Multiple online scanners where able to load the site, and that link has a large section of css that is added in from somewhere (not a stylesheet).

    Anyway, what you need to do to get site back up is to use an FTP client such as FileZilla or your host provided file management tool to rename the theme’s function.php file to old.functions.php and then upload an unedited copy from your current version of theme.

    Thread Starter Beth

    (@pedalkraft)

    Aha! Thanks for the explanation ??

    I can manage my files via the host so will try this now.

    Thread Starter Beth

    (@pedalkraft)

    OMG that’s done it.
    ***Thank you***
    Happy Christmas!

    PS I know I ask some rather basic stuff on this forum but I am so truly grateful for the help here and really am learning ??

    Great! Glad to help. Please mark this as resolved if so. Resolved posts help forum visitors find better content.

    Thread Starter Beth

    (@pedalkraft)

    Will do.

    Thread Starter Beth

    (@pedalkraft)

    Topic resolved. Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatral error in functions.php and custom CSS file location’ is closed to new replies.