Module shows "class not found" or "namespace not found" error.
This almost always means PrestaShop or Composer cannot load a PHP class that the module expects. Read the exact missing class in the fatal error first; the namespace usually tells you whether the missing file belongs to the module itself, a bundled vendor/ dependency, a shared package, or a stale cache entry.

- Incomplete module files. Re-upload the original ZIP. Do not copy only the main module PHP file, and do not merge a new version over a half-deleted old folder.
- Missing Composer autoload. If the module has
vendor/autoload.php, that file and the wholevendor/tree must be present. PrestaShop loads active module autoloaders during Symfony/container boot on modern branches, so a missing vendor folder can break pages beyond the module configuration screen. - Wrong case on Linux.
MyClass.phpandmyclass.phpare different files on Linux. A module that worked on a case-insensitive local machine can fail after upload. - Stale class cache. Clear
var/cache/prodandvar/cache/dev. On older installations, also remove the generated legacy class index under the active cache directory if it exists. - OPcache still serving old code. Reload PHP-FPM or Apache after replacing module files. Clearing PrestaShop cache does not reset web OPcache.
- Wrong PHP version. Composer dependencies can require a newer PHP version than the server is running, or a module may use syntax unsupported by your PHP branch.
- Unreadable files. Make sure the module directory and vendor files are readable by the web-server user.
# From the PrestaShop root
test -f modules/examplemodule/vendor/autoload.php && echo 'module autoload exists'
find var/cache/prod -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
find var/cache/dev -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
sudo systemctl reload php8.2-fpmThe reliable reset is: back up the current folder, delete the broken module folder, extract the original ZIP cleanly, restore only documented uploads or exports, clear PrestaShop cache, reset OPcache and reload the page. If the fatal names a shared library class, include the exact class name and stack trace when contacting support.
For related white-screen and 500-error checks, see our PrestaShop troubleshooting guide.
Was this answer helpful?
Still have questions?
Can't find what you're looking for? Send us your question and we'll get back to you.