octobercms/october · error · Exception

A theme already exists at '{$themeFolder}' please rename thi

Error message

A theme already exists at '{$themeFolder}' please rename this folder and try again.

What it means

Error "A theme already exists at '{$themeFolder}' please rename this folder and try again." thrown in octobercms/october.

Source

Thrown at modules/cms/console/ThemeInstall.php:104

        passthru('"'.PHP_BINARY.'" artisan plugin:check');

        $this->output->success("Theme '{$name}' installed");
    }

    /**
     * assertCanInstallTheme makes sure the theme isn't in use
     */
    protected function assertCanInstallTheme()
    {
        $name = strtolower($this->argument('name'));

        $parts = explode('.', $name);
        $themeFolder = $parts[1] ?? null;
        $themePath = themes_path($themeFolder);

        // Ensure a theme does not already exist
        if ($themeFolder && file_exists($themePath)) {
            throw new Exception("A theme already exists at '{$themeFolder}' please rename this folder and try again.");
        }
    }

    /**
     * performLockOnTheme locks the theme and creates a child theme
     */
    protected function performLockOnTheme()
    {
        $name = strtolower($this->argument('name'));

        // Legacy composer installers
        $parts = explode('.', $name);
        $themeFolder = $parts[1] ?? null;
        $themePath = $themeFolder ? themes_path($themeFolder) : null;

        // New composer installers
        if (!$themePath || !file_exists($themePath)) {
            $themeFolder = strtolower(str_replace('.', '-', $name));

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/cms/console/ThemeInstall.php:104 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/4708538f85e6b38b. Report an issue: GitHub.