Your website was perfectly fine last week. You checked it every day, took orders, got leads, paid your bills. Then suddenly, one morning, you open your browser and see a blank white screen. Or an error message that says "There has been a critical error on your website." Your phone starts buzzing with customers who can't reach your menu, your store, your booking form. Panic sets in.
This is exactly what happens when a hosting company updates the version of PHP that runs your website. PHP is the engine underneath almost everything on the web. Think of it as the oil and gas that makes your car move. In late 2022, PHP 8 officially removed a small piece of that engine that older parts of websites had been using for years. That piece is called create_function. If you've ever searched for "php create_function removed php 8 official documentation," you already know you're not alone.
But here's the good news: this isn't a "call a developer and wait three days" emergency. In many cases, you can fix it yourself in fifteen minutes. In this post, I'll walk you through exactly what went wrong and the precise steps to take, in the order that works, so you can get back online – and stay online.
Why the php create_function Removed in PHP 8 Official Documentation Matters to You
Let me put this in plain English. The PHP 8 update removed an old feature that many older plugins and themes used. It's like a car company removing the tape deck. If your car still only plays tapes, you can't play music anymore. That's what happened to your website. The version of the plugin or theme you're running was built using that old tape deck, and now it doesn't work with the new engine.
The php create_function removed php 8 official documentation explains that this function was always considered risky and insecure. It was "deprecated" (a warning to developers) back in PHP 7.2, then kept on life support for a few years, and finally shut down completely in PHP 8.0. For you, this means any code on your site that relies on that function will crash the moment your host moves you to PHP 8. It's not a bug. It's a planned change from years ago.
The cost of ignoring it is immediate: lost sales, broken forms, a site that says "fatal error" to every visitor. For an online store, even six hours of downtime during a weekend can cost thousands. Let's not let it get to that.
Step 1: The Quickest Fix – Switch Your Site Back to PHP 7.4 (10 Minutes)
Your hosting company controls which version of PHP your site runs on. That's the first thing to check. Even if your panel looks a little different, the menu names are fairly standard.
- Log into your hosting control panel (usually at
yourdomain.com/cpanelor via a link in the email/welcome message you got from your host). - If you use cPanel (a very common interface), look for a section called "Software" or "Developer Tools". Inside, you'll see something called "Select PHP Version" – in some hosts it's "PHP Version Manager" or "PHP Settings."
- Click it. You'll see a dropdown with a list of PHP versions like 8.2, 8.1, 8.0, 7.4, and maybe older.
- Pick 7.4 (or any 7.x version, but 7.4 is the best). Click "Set as Current" or "Apply".
- Now reload your website.
That's it. In most cases, this immediately brings your website back to life. Why? Because the version of PHP your site is running now still includes the old create_function. Your plugins and themes are happy again.
Important: this is a temporary fix, not a permanent solution. Your host may not offer PHP 7.4 forever – some have already removed it. But step 1 gives you breathing room. Don't celebrate and move on. Go to Step 2.
Where did I learn this? The php create_function removed php 8 official documentation is very clear about what was removed, and your host's PHP selector is the manual override that lets you keep the old engine until you're ready to upgrade your website's parts.
Step 2: Update Your WordPress Plugins, Theme, and Core (While You're Online)
Once the site is loading, log into your WordPress dashboard. In the left menu, click "Plugins" then "Installed Plugins." Look at the list. You'll probably see a red circle on several plugins saying an update is available. Update all of them – one by one is fine.
Then go to "Appearance" → "Themes." Update your active theme if there's an update. Finally, go to "Dashboard" → "Updates" and click the button to update WordPress itself.
These updates have long been ready for PHP 8. The developers of those plugins and themes have already fixed the old create_function problem. By updating, you are, in effect, swapping out the old tape deck for a digital system.
If you can't log into your WordPress dashboard because you're still seeing the white screen even after switching to PHP 7.4, then you have a different problem – see Step 3.
Step 3: Still Broken? Use WordPress Recovery Mode (The Email Is Your Key)
If you got the "critical error" message, WordPress likely sent an email to the admin address for your site. That email looks like this: "Your site is having a technical issue with a critical error." More importantly, it contains a special link, usually labeled "Enter Recovery Mode."
That link takes you into a safe version of your WordPress dashboard. From there, you can click Plugins, see which plugin caused the problem (often it's the one that was last updated, or one you haven't touched in years), and press "Deactivate." Then check if your site loads. If it does, you've found the culprit. You can then either update it or delete it.
If you can't find that email, try logging in to your WordPress admin at yourdomain.com/wp-admin. WordPress may automatically put you in recovery mode and ask for confirmation.
Step 4: Last Resort – Disable All Plugins with cPanel File Manager
If recovery mode isn't available and your site is still down, you can turn off all plugins from your hosting file manager. This is the manual, slightly scarier step, but it's safe.
- Go back to cPanel, open File Manager.
- Navigate to
public_html→wp-content(some hosts use another name likehtdocs, butpublic_htmlis standard). - You'll see a folder called "plugins". Right-click on it and choose "Rename". Rename it to "plugins_off".
- Reload your website. All plugins are now disabled, so the site should load – possibly without some features.
Now you can log into your WordPress admin (yourdomain.com/wp-admin). Once inside, you'll need to figure out which plugin was the bad one. A good next step is to go to Plugins in the dashboard, but since you renamed the folder, WordPress won't see the ones inside it. You can still install a new, safe plugin called "Health Check & Troubleshooting" – it lets you test plugins one by one without breaking your site. Then rename the plugins_off folder back to plugins (via the same File Manager) and use Health Check to safely diagnose.
That last paragraph is a little technical, but it's genuinely what a developer would do. You can handle it if you follow the folder names exactly.
If you get stuck – and it's completely normal to get stuck here – you now have a real option: you've already done the hard troubleshooting. You know the PHP version, the plugins you have, and which steps you tried. That makes hiring help cheaper and faster.
If you followed the steps above and it's still broken (or you'd rather not do it yourself), that's exactly when DevCev Digital can help – just bring your host's name, the steps you already tried, and any error messages you saw, and we'll get your site back online and PHP 8 ready.