Hi all,

I’m completely new to Lando/Docker and could really use some guidance—I’m not even sure where to start asking for help.

I think I messed up my Lando/Docker setup. When trying to run Docker commands, I have to explicitly use lando start or lando info instead of just start or info. Is that expected behavior?

On top of that, I switched my Drupal theme from Bartik to Zen, and now I’m getting the following error when accessing the site:

    "The website encountered an unexpected error. Please try again later."

I can’t access anything on the site anymore and don’t know how to switch back to Bartik.

Would it make sense to uninstall and reinstall everything at this point, or is there a way to recover my site and fix the theme issue without starting over?

Any help would be greatly appreciated!

Comments

stefan lehmann’s picture

I can't tell you much about Lando .. but an "The website encountered an unexpected error. Please try again later." usually means a PHP Fatal error which should have a log entry in the php docker container.

I'm not sure what your development process is but whenever you change a setting .. that setting should be exported into (a) config file(s) so the site can be rebuild from scratch.

So if you're asking yourself how to recover your site you probably didn't export anything? You probably want to read about that.

kableone’s picture

Hi there,

these kinds of issues can definitely be overwhelming when you're just starting out with Lando, Docker, and Drupal, but you’re not alone! Let’s break down the problem and try to get your site back up and running without starting from scratch.

1. Lando vs Docker Commands

Yes, it’s expected that you use lando start, lando info, etc., instead of raw Docker commands. Lando is a wrapper around Docker designed to simplify local development environments. So no worries there  you're using it correctly!

2. Drupal Theme Switch Causing Site Error

Switching themes can sometimes cause fatal errors, especially if:

  • The theme has missing dependencies (like a base theme or libraries).

  • There are syntax errors in .info.yml or template files.

  • Caches are not cleared after the switch.

Try These Steps First (Recovery Options):

  1. Access Drush via Lando:
    If Drush is available in your environment, try running:

    
    

    bash

    CopyEdit

    lando drush theme:enable bartik lando drush config-set system.theme default bartik lando drush cr

    This should re-enable Bartik and set it back as your default theme.

  1. Manually Change Default Theme in DB:
    If Drush isn't working, you can:

    • Use lando mysql to access your DB.

    • Run this query:

      
      

      sql

      CopyEdit

      UPDATE config SET data = REPLACE(data, 'zen', 'bartik') WHERE name = 'system.theme';

    • Then clear cache using:

      
      

      bash

      CopyEdit

      lando drush cr

    Or truncate cache_* tables manually if Drush isn't available.

  2. Log Files:
    Check your logs for the actual error:

    
    

    bash

    CopyEdit

    lando drush watchdog:show

    Or check:

    
    

    swift

    CopyEdit

    /web/sites/default/files/php/twig OR /logs  

3. When Should You Reinstall Everything?

Reinstalling should be your last resort These theme issues are usually fixable with some debugging. A full reinstall may erase your content/config unless you’ve backed it up.

If you’re still stuck, feel free to share your lando.yml and error log outputs please let me know

For More Visit: KableOne