elementor error notice Post CSS File

Error: Elementor\Post_CSS_File is deprecated

There’s nothing worse than loading a website and finding an error, except finding that error at the top of the page!  It’s the first thing that users see and what an impact, especially as a WordPress web developer, an error at the top of the screen can make.  You’ve essentially LOST any potential sale from the visitor that came to the site!

The only thing worse than getting an error on the website is when you search forums and Google for an answer, and you find hundreds of people with the same error (or websites showing the same error) and nobody providing a real answer!

Fear not, I have a solution for you.

The Error I Got With Elementor

Notice: Elementor\Post_CSS_File is deprecated since version 2.1.0! Use Elementor\Core\Files\CSS\Post instead. in /public/wp-includes/functions.php on line 4016

The error notice from Elementor is quite ugly, isn’t it?  And, in many ways, it’s really not that helpful or informative.

Sure, we can see that they want us to use a different system than how it was previously used, but there’s not much more available.  Searching the community at Elementor has proved fruitless, so I then went searching Sourceforge to see what others may have come up with, and also the WordPress Plugin and Support section.

From what I could find, there was staff from Elementor advising users to enable “Safe Mode” and to ignore the error.

Ignore the error?  If I’m to ignore it, why bother having it display in the first place?  That seems like a ridiculous answer to a problem and really poor advice!

How Did The Error Notice in Elementor Start?

There’s any number of ways that you can trigger this error, but at the end of the day, essentially, it’s triggered by updating the Elementor plugin and code in the plugin not being compatible with the latest version.

For me, the error started after updating my Elementor Plugins:

Elementor 2.3.5 was upgraded to Elementor 2.4.1
Elementor Pro 2.2.5 was upgraded to Elementor Pro 2.3.1

The moment I updated the two Elementor plugins, I started to get the following error:

Notice: Elementor\Post_CSS_File is deprecated since version 2.1.0! Use Elementor\Core\Files\CSS\Post instead. in /public/wp-includes/functions.php on line 4016

As you can see, both plugins that I updated were a major branch version update, and as with any update, the best advice is to use a testing environment before going live.  Thankfully, our processes and procedures are in place so we didn’t display the error, but others are often not so lucky.

Sometimes, webmasters can spend days tracking down the issue. And worse, sometimes the update of the plugins were performed by a client or end-user and the webmaster doesn’t even know that an error was generated.

Enable Safe Mode, Disable the WordPress Debug

From the various places I found online, everyone suggested just to enable the Safe Mode and the error goes away. Essentially, it suppresses the notice so you don’t see it. It doesn’t mean that there’s still not an issue, it just means that you’re not going to see the warning.

While this might work as a temporary fix, it doesn’t actually resolve the issue, it just masks it.

You can enable Safe Mode in Elementor by going to Elementor > Tools

Enabling the Safe Mode in Elementor didn’t help in my case, and from what I can read, it didn’t help with many other people either.

How did I finally fix the Error / Notice in Elementor?

No matter what I did, the notice continued to show:

Notice: Elementor\Post_CSS_File is deprecated since version 2.1.0! Use Elementor\Core\Files\CSS\Post instead. in /public/wp-includes/functions.php on line 4016

But hey, I finally found exactly what was causing the problem for me, and the issue was my theme – OceanWP.

I love the OceanWP Theme and I probably have it installed on a dozen or more sites that we’ve developed.  It gives so much flexibility, but in this particular case, the notice and error being presented by Elementor were because of OceanWP and their code.

They updated their theme, but I never updated it on the site – after all, the general rule of thumb is if it’s not broke, don’t fix it. The only exception to that rule is if there’s a security update, then YES, you should definitely update!

Once I updated OceanWP to version 1.6.1, the error went away. There is something in their code which was using the old format that Elementor used to have, and since Elementor changed their path, OceanWP needed to change theirs too.

Did you Resolve Your Elementor Notice Too?

Shame on me for not updating the theme sooner! There’s really no reason not to have updated it other than there was nothing broken on the website, so why bother?  Well, like other plugins update, the theme will now be something I need to monitor too.

Did you experience any issues with the Elementor Notice regarding the POST CSS FILE change in Elementor?  Did you resolve it with the Theme also, or was there another method you used?

If you’re having problems with your WordPress website, or need some assistance with editing things, drop us a call or send us a message and we’d love to take a peek behind the curtains and see what’s going on.

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email
Check Out These Other Articles

Understanding XML Sitemaps, Content Syndication and SEO

Content syndication is a strategy that’s used by businesses to reach a wider audience. While content syndication can put a business in front of new prospects, it’s important to do so in a way that doesn’t negatively impact SEO efforts. This post is going to cover what XML sitemaps are, as well as explain how they can be used to

Article: Repeat offenders Will Be Punished By Google

Repeat Offenders Will Be Punished By Google

For over a decade, Google has been playing an active role in keeping web surfers and website visitors safe from websites that intend to do them harm. It’s been called the “Safe Browsing Initiative”. Whether it’s a website that has been hacked and defaced, or a website that has been infected with a malicious virus, Google Search generates a warning

Ask an Omaha SEO Agency: Is My Website Credible?

As a leading Omaha SEO agency, we here at Big Red SEO get asked all kinds of questions in our initial audit consultations. Most often, a business will have us look at their existing website (which they had a low-quality website mill churn out) and ask us why they’re not seeing the rankings, visitors, and conversions they want. It’s not

Close Menu