Website Without PHP
English (United Kingdom)GB
  • English (United States)
  • English (United Kingdom)
  • Dutch (Netherlands)
  • Dutch (Belgium)
Menu

Class not found after a PHP upgrade

PHPPHP is a programming language that builds your web pages on the computer that hosts your site, just before they reach the visitor. WordPress runs on it. reports Class not found after you changed its version.

Which PHP version does your site report?

We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

Get help with your website

More about this

A component is trying to use code that is unavailable under the requested class name.

Start with the name and file in the message.

Replacing only the last file mentioned is usually not an evidence-based repair.

Error

Before you start

Save the complete error message and its timestamp in a private note. Record which page or action triggers it and what changed immediately beforehand. A screenshot of a blank page gives a developer less to work with than the first relevant log entry.

Do not post passwords, customer information or complete server paths in a public support thread.

Back up both files and the database before changing anything. Check how you would restore that backupA backup is a separate copy of your website's files and database, so you can bring the site back after a mistake, a hack or a failed update. too. Prefer a restricted test copy using the same PHP versionA PHP version is a numbered edition of PHP, like 8.3. Each edition is looked after for a limited time, then gets security fixes only, then nothing..

Disable real payments and outgoing customer emails on that copy. Change one thing per attempt and keep a note of it, so you can reverse an unsuccessful change without guessing what the previous setting was.

Classes and autoloading explained

A class groups code for a particular kind of task or object. Websites often load that code only when it is needed. This is called autoloading.

PHP gives registered autoloaders an opportunity to load a missing class. If it remains unavailable, execution cannot continue with that class as requested.

The PHP manual records that the old __autoload() function was removed in PHP 8.0. That is one specific upgrade-related cause. Other possible investigations include an incomplete upload, an incorrect namespace or a missing package.

None of those is established by the short message alone.

Five steps to a repair

  1. Save the complete class name, including its namespace, together with the file and first error line. Record the action that triggers it. Check whether a package installation or upload stopped beforehand. That is different evidence from a change limited to the PHP version.
  2. Identify who supplies the class. Does it belong to a pluginA WordPress plugin is an add-on you install in WordPress to give your site extra features, such as contact forms, SEO tools or a webshop., a bundled library or a PHP extensionA PHP extension adds functions to PHP that a website or application may need.? Compare the installed files with the intended release. Do not copy a similarly named file from another website; its contents may belong to incompatible package versions.
  3. Ask the developer to check how the autoloader is loaded. Old code may need __autoload() replaced with supported registration. A package-managed application needs its recorded package set present in full. Request concrete evidence at each step instead of accepting repeated attempts as a diagnosis.
  4. Restore the appropriate release on a test copy. If needed, rebuild autoload files using the project's existing instructions. Do not delete the lock file or add an empty class to silence the error. The calling code expects actual behaviour from the requested class.
  5. Test the journey that uses the class, including its output. Check a second journey depending on the same package. Review fresh log entries and record the file set and PHP version that work together. This makes the next release easier to verify against a known result.

Why the sequence matters

A missing class can be a consequence of an earlier failed installation. Repairing that installation first may be more useful than changing the plugin that calls the missing class. Look at the first failure in the timeline.

A later message can describe what is now missing without naming the original cause.

When to get help

Use the help form below if package management, namespaces or autoloaders are unfamiliar, or if a live update was only partly completed. Share the class name and relevant versions privately. Ask the developer to establish where the class comes from and test the feature that depends on it.

A vanished error without a working feature is not enough.

Check the result

Repeat the exact action that failed first. Then check login, a form submission and the main journey through your website. For a store, use a test order without a real charge.

Read the log for fresh messages with a recent timestamp. A working homepage alone does not establish that every affected function works again.

Keep the version numbers, the change and the outcome with your maintenance notes. Agree who will check the next update. Stop if the same error returns after the suspected cause has already been addressed.

Revisit the diagnosis instead of changing an increasing number of settings together. The aim is a repeatable repair that someone else can understand and verify.

Frequently asked questions

Can I download a replacement class?

Use the intended package version and a trusted supplier release. A similarly named class from another project can have different behaviour and dependencies.

Can the mini-check prove this cause?

No. A public check does not replace investigation of private logs and server settings. Use the error message and failing action as the starting point.

When is the repair complete?

When the original action produces the correct result and fresh logs show no recurrence. Keep the versions and test result in your maintenance notes.

Sources

Accessed on 22 October 2026.

  1. Domain
  2. Check
  3. Result
  4. Report

Which PHP version does your site run?

Enter your domain. We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

We keep the domain and the result, never your IP address.