• Hello,

    Theme Editor cannot update changes.

    Whenever I make any changes in the ‘style.css’ file in my “child-theme” editor, and click to ‘update Change’, I get the following message:

    “Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over https://FTP.”

    This tarted happening almost two weeks ago – it was working alright until then.

    Any help to fix it is greatly appreciated.

    Thank you.

    • This topic was modified 5 years, 9 months ago by Parwaiz Khan. Reason: Added Topic Tag

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Stef

    (@serafinnyc)

    Do you have FTP access by any chance? Just not recommended to edit files the way you are doing it.

    Aside from that you can add css styles to the additional css tab inside Customize now. No need to edit core files for that.

    Thread Starter Parwaiz Khan

    (@parwaiz-khan)

    Hi Stef,
    You wrote, “Just not recommended to edit files the way you are doing it.”

    Can you clarify what other way a child-them’s style.css should be edited? I clearly mentioned in my query that it was not a ‘core’ (theme) file – it is in the child-theme.

    Yes, it can be uploaded via FTP – but, a cumbersome way to do it.

    I wanted to know what has happened to the theme editor, and how to fix it.

    Thank you.

    Stef

    (@serafinnyc)

    Certainly. Chances are there’s nothing wrong with the Theme Editor.

    You said

    Theme Editor cannot update changes. Whenever I make any changes in the ‘style.css’ file in my “child-theme” editor, and click to ‘update Change’, I get the following message:

    It is NEVER recommended you edit ANY file thru the theme editor. ALWAYS use FTP, (not cumbersome; just the right way to do things) you can crash your site and make life a lot harder than it has to be. However, having said that, if you are adding or wanting to override CSS styles you can now use Additional CSS which is located in Customize

    View post on imgur.com

    Then scroll down

    View post on imgur.com

    Add you CSS styles there. Make sure you’re adding !important to your styles if they’re not overriding.

    Thread Starter Parwaiz Khan

    (@parwaiz-khan)

    Hi Stef,

    Thank you for looking into it and taking time guide me.

    But, I don’t agree with your suggestions. Of course we put smaller CSS addition in ‘Additional CSS’ – But, for the deep styling we do in our child-theme. That is the best way – Or it used to be until the Theme Editor got this bug.

    BTW, WordPress forum is bustling with comments and complaints of this same issue. Different users are suggesting different remedies.

    Also, why FTP? Why not simply upload the file (via Cpanel etc)?

    Anyhow, thank you again for your help.

    Stef

    (@serafinnyc)

    Don’t want my advice that’s fine. I’ve only been doing this for 30+ years.

    The Code Editor does a loopback check with your changed file to make sure it doesn’t cause a crash. If that loopback doesn’t work, you could see the message you are seeing.
    Something could have changed on your server to cause this.
    Try using the Site Health page (if you have 5.2) or the Health Check plugin (if you have less than 5.2) to run all the checks. One of the checks is for loopback.

    The reasoning behind the advice not to use the Code Editor is that it leaves your site with the only copy of the change, not to mention there’s no preview to see what you’re doing. If you test the change on a local site, then copy it to the live site using FTP, you automatically have a backup copy and it’s tested.

    Also, why FTP? Why not simply upload the file (via Cpanel etc)?

    FTP is usually simpler than logging in to cPanel and going to the File Manager. But yes, it’s all about transferring a known good file from an external copy instead of just editing the only, live version of the file in a crummy textarea interface.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Theme Editor cannot save changes in style.css file’ is closed to new replies.