• Resolved fatata

    (@fatata)


    At first: sorry for my english.

    I edited my friend’s wordpress theme Cinnamon in custom-header.php and when i apply changes all broke down and show me only this:

    Parse error: syntax error, unexpected 'default' (T_DEFAULT) in /home/users/xxxxxxx/public_html/xxxxxx.pl/wp-content/themes/cinnamon/inc/custom-header.php on line 9

    I cannot login to wp-admin, and i dont know how can i reverse changes to this file? Is there somebody to upload “clean” php file for me? Support for example? I only want to put original file from this theme, i found one on website.

    I was using only web browser, i didn’t install WP.

    Probably what i did wrong:
    When (in file php) was commentary with “*” i put addres to image file with “/” in beggining, so it looked like “*/addres.jpg” and program probably found it like error. Maybe that was my mistake, but hey, it was a big, BIG mistake for crash everything? Is that un-reversable?

    Please help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The only way to fix this problem is to access the FTP and swap out the custom-header.php file with a clean copy from your back up, if that is the source of the error.

    Seems like it is if the problem came up immediately after the change.

    If you have FTP access to your server you can go into the wp-contents>themes>Cinnamon folder and upload a clean version in place of the tainted PHP file. That should restore your access to the dashboard.

    If you are not used to working with an FTP program I would suggest Fetch or FileZilla, get the FTP URL, Username, and password information from your host.

    Just be very careful, think of this as surgery with a scalpel, you are removing the one bad file and replacing it with a clean version from the Cinnamon theme. Unless you know what you are doing don’t touch anything else.

    You also may need to go back in and re-apply any changes you have in the header.

    Good luck.

    It’s best to usually edit WordPress php template theme files on your local computer – then make the change and upload it to check that it works and doesn’t break your theme.

    If you’re missing a bracket in php or something similar it’s much easier to review the line mentioned locally and find the problem (usually around what you edited) and re-upload the php file to see if that fixes the error.

    It looks like you can see the error, but sometimes you have to enable debug mode in your wp-config.php file if you just get a blank screen:

    //define('WP_DEBUG', true);

    jpm1234 True that!

    Just remember to return the debug to False when you are done since it conflicts with some plug ins.

    I can’t log into my wp admin too, when I change the site URL to my domain name. I’ve looked at all the forums regarding changing the URL and have tried almost everything but the domain just won’t change. It keeps giving me error messages and won’t let me login into the admin when I’ve changed it. I bought the domain from a different host, could that be the reason?

    If not, can someone help me with this dilemma please.

    This is the link to my website https://localhost:8888/wordpress/ but I want to change it to thebloggershub.com

    Please not, that I can no longer change the URL from the dashboard because its greyed out.

    Thank you

    Thread Starter fatata

    (@fatata)

    OK, file is replaced with original php and it works fine now. But i still can’t understand how and why that little mistake ruined ALL pages :/

    Thank you all, thank you BrettEllis_CPM!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cannot login to wp-admin. All crashed down :(’ is closed to new replies.