CSS errors & unable to save Functions.php

WordPress 4.9 introduced big changes to the Theme Editor. The Editor now looks like this:

Quick Summary

  • Don't be alarmed by CSS errors. They will not affect your site negatively.
  • If you want to make a change to the CSS, you can safely check the box "Update anyway" box. Your site will NOT break.
  • If you are unable to save the Functions.php file, you can edit the file in your File Manager or FTP instead.

Why are there errors in the style.css file?

We have received lots of concerned emails about the CSS "errors" that now display in the Editor, and the scary checkbox that says saving might break your site.

First, making CSS changes will not break your site. You are safe to make changes to the CSS file. Click the checkbox without fear – your site will not break, we promise.

Second, the CSS errors that are noted will not harm your site. You'll see at least 3 errors shown in every one of our themes, due to some keyframe code that erroneously gets flagged as invalid, but is not. Any errors beyond these will not affect your site negatively, and you don't need to worry about them.

Third, the CSS errors have NO effect on your ability to save other files. It's a common misconception that you need to "correct" the errors before you are able to save other files. This is not true. See the next section regarding editing PHP.

Unable to save Functions.php

The other big change in WordPress 4.9 is to the PHP files. PHP files are extremely sensitive and, unlike the CSS, can break your site if there's a tiny error.

Whenever you save PHP files in 4.9, WordPress now runs a check on the file to make sure it's not going to break your site. If WordPress determines the file will break your site OR it is unable to determine the outcome, it won't allow you to save. More often than not it's the latter (unable to determine). WordPress being unable to determine the outcome is not fault of the theme; it's just that the WordPress file check process errs on the side of caution – as it should!

If you need to make a change to your Functions.php but you are unable to save, there are a few workarounds:

  1. Access the File Manager in your hosting cPanel and edit the file from there.
  2. If your host doesn't give you access to the file manager, you can use FTP instead.
  3. You can also use the File Manager plugin to edit your files directly in the dashboard. We don't really recommend this option, because if a breaking change is made, you would need to access your site remotely (via File Manager or FTP) to remove the offending code.