How to Fix “Uncaught TypeError: l.createRoot is not a function…” in WordPress.

There’s nothing scarier than making changes to your WordPress site—like installing a plugin or tweaking some code—and being met with the dreaded white screen of death. 😳

That moment of panic hit me just a few days ago when I added the Ultimate FAQs plugin to a website built with the Divi theme.

At first, I thought my entire site had gone down, but I quickly realized only the backend had white-screened. The front end of the site was working fine.

However, when I tried adding a new post, page, or FAQ entry, I noticed something odd. Opening the developer tools Console in my browser (found under “View > Developer > Developer Tools” in Chrome or “Tools > Browser Tools > Web Developer Tools” in Firefox), the following error popped up:

“Uncaught TypeError: l.createRoot is not a function…”

If you’re unfamiliar with the developer tools Console, error messages like these show-up, giving you a clue about what’s going wrong. After seeing this, I did what we all do—I Googled and Googled some more, but nothing seemed to solve the problem.

Then, I remembered encountering a somewhat similar issue about a year ago. The fix was as simple as installing the Classic Editor plugin for WordPress at that time.

I thought to myself, “Why not give it a shot? I’ve got nothing to lose!” And guess what? It worked like a charm!

In this tutorial, I’ll walk you through step-by-step how to fix the “Uncaught TypeError: l.createRoot is not a function…” error in WordPress so you can get your backend editor up and running again.

Step 1: Install the Classic Editor Plugin

  1. Log in to your WordPress admin dashboard.
  2. Navigate to Plugins > Add New.
  3. In the search bar, type Classic Editor.
  4. When the plugin appears, click Install Now and then Activate.

That’s it! After activating the Classic Editor plugin, refresh your site’s backend and test the functionality again. In my case, this completely fixed the error, allowing me to add FAQ entries without a hitch.

Step 2: Try the Classic Widgets Plugin (Optional)

If installing the Classic Editor plugin doesn’t resolve the issue, you can also try installing the Classic Widgets plugin. Sometimes, issues like this can arise from conflicts between the block-based editor (introduced in WordPress 5.0) and older plugins or themes.

To install Classic Widgets:

  1. Go to Plugins > Add New in your WordPress dashboard.
  2. Search for Classic Widgets, click Install Now, and then Activate.
  3. Refresh your backend and test the editor again to see if the error disappears.

Step 3: Deactivate All Plugins (If Necessary)

If neither plugin solves the issue, the next step is to deactivate all your plugins and then reactivate them one by one to identify the culprit. Here’s how:

  1. Go to Plugins > Installed Plugins.
  2. Check the box at the top of the list to select all plugins.
  3. From the dropdown menu, select Deactivate, and click Apply.
  4. Test your site to see if the error is resolved.
  5. Reactivate plugins one at a time, checking after each activation to see if the error reappears.

This process will help you pinpoint which plugin is causing the conflict.

Why Does This Error Happen?

The “Uncaught TypeError: l.createRoot is not a function…” error typically occurs when a plugin or theme attempts to use a feature from an outdated or unsupported version of React (the JavaScript library WordPress uses for its block editor). Plugins like Ultimate FAQs might rely on the newer React API, which can conflict with themes or plugins that haven’t been updated to support it.

By reverting to the Classic Editor or Widgets, you bypass the block editor and ensure compatibility with older plugins.

In my case, the Classic Editor plugin was the perfect fix. It eliminated the error and brought back full functionality to the WordPress backend. If you’ve tried all the steps above and still encounter the error, it’s worth reaching out to the plugin or theme developers for support or checking if your WordPress installation and PHP version are up to date.

I hope this tutorial helps you tackle the “Uncaught TypeError: l.createRoot is not a function…” error easily! If you’ve found another fix or workaround, feel free to comment below and share your experience.

Happy WordPress troubleshooting, and until next time, happy coding! 😊

Share:
Written by Alvin Brown
He's an experienced and passionate serial entrepreneur, founder and publisher of Kickstart Commerce. Alvin possesses a great love for startups dominating their market using profitable digital strategies for greater commerce.