---
title: "ShopPerformance - Shopware 6: .env.local.php verwenden"
description: Ab Shopware 6.4.8.0 unterstützt Shopware die Einstellungen, direkt in eine .env.local.php zu schreiben.
---

[Zu Content springen](https://knowledge.maxcluster.de/shopware-6-.env.local.php-verwenden#main-content)

- [Deutsch](https://knowledge.maxcluster.de/shopware-6-.env.local.php-verwenden)
- [English](https://knowledge.maxcluster.de/en/shopware-6-using-.env.local.php)

Deutsch

Untermenü für Übersetzungen anzeigen

[![maxcluster\_byteamblue\_logo\_main](https://knowledge.maxcluster.de/hubfs/maxcluster_byteamblue_logo_main.svg)](https://knowledge.maxcluster.de/)

Hauptnavigation öffnen

Hauptnavigation schließen

- - [Deutsch](https://knowledge.maxcluster.de/shopware-6-.env.local.php-verwenden)
    - [English](https://knowledge.maxcluster.de/en/shopware-6-using-.env.local.php)

  Deutsch
  
  Untermenü für Übersetzungen anzeigen
- [maxcluster.de](https://maxcluster.de/)

[maxcluster.de](https://maxcluster.de/)

 Wie können wir Ihnen helfen?

- Es gibt keine Vorschläge, da das Suchfeld leer ist.

1. [Knowledge Base](https://knowledge.maxcluster.de/)
2. [Managed Center](https://knowledge.maxcluster.de/managed-center)
3. [ShopPerformance](https://knowledge.maxcluster.de/managed-center#shopperformance)

27\. November 2025

# ShopPerformance - Shopware 6: .env.local.php verwenden

## Ab Shopware 6.4.8.0 unterstützt Shopware die Einstellungen, direkt in eine .env.local.php zu schreiben.

**Bitte beachten Sie:** Die Informationen in diesem Artikel beziehen sich ausschließlich auf unser Tool [**ShopPerformance**](https://knowledge.maxcluster.de/was-ist-shopperformance), mit dem Sie mögliche Performance-Verbesserungen in Ihrem Onlineshop erkennen können.

Ab Shopware 6.4.8.0 ([https://developer.shopware.com/docs/guides/hosting/performance/performance-tweaks#.env.local.php](https://developer.shopware.com/docs/guides/hosting/performance/performance-tweaks#.env.local.php)) unterstützt Shopware die Einstellungen, direkt in eine `.env.local.php` zu schreiben. Diese Funktion ist ein Symfony Core Feature ([https://symfony.com/doc/current/configuration.html#configuring-environment-variables-in-production](https://symfony.com/doc/current/configuration.html#configuring-environment-variables-in-production)). Hierdurch muss die `.env` Datei nicht bei jedem Request geparsed werden.

Shopware liefert jedoch noch keine Möglichkeit, die `.env.local.php` automatisch zu generieren, aber man kann sie erzeugen lassen. Auch wird das Symfony Tool Flex nicht mit Shopware ausgeliefert.

### **Lösung**

Obwohl Shopware noch keine Möglichkeit bietet, die .env.local.php automatisch zu generieren, ist es dennoch möglich, die Datei .env.local.php zu verwenden.

Hierfür kann eine entsprechende Datei auf Basis der bisherigen .env Datei angelegt werden. Die Syntax muss dazu in ein PHP-Array umgeschrieben werden. Eine entsprechende Datei kann daher beispielsweise wie folgt aussehen:

`<?php`

`return array (`

`       'APP_ENV' => 'prod',`

`       'APP_SECRET' => '***',`

`       'APP_URL' => 'http://sw6.c-421.maxcluster.net',`

`       'DATABASE_URL' => 'mysql://db-user-1:***@localhost:3306/db-1',`

`       'COMPOSER_HOME' => '/var/www/share/sw6.c-421.maxcluster.net/sw6/var/cache/composer',`

`       'INSTANCE_ID' => '***',`

`       'BLUE_GREEN_DEPLOYMENT' => '1',`

`       'SHOPWARE_HTTP_CACHE_ENABLED' => '1',`

`       'SHOPWARE_HTTP_DEFAULT_TTL' => '7200',`

`       'SHOPWARE_ES_HOSTS' => '',`

`       'SHOPWARE_ES_ENABLED' => '0',`

`       'SHOPWARE_ES_INDEXING_ENABLED' => '0',`

`       'SHOPWARE_ES_INDEX_PREFIX' => 'sw',`

`       'SHOPWARE_CDN_STRATEGY_DEFAULT' => 'id'`

`);`

Ausführliche Informationen zu **Shopware Hosting** bei **maxcluster** erhalten Sie unter [maxcluster.de/shopware-hosting](http://maxcluster.de/shopware-hosting)

Bei Fragen steht Ihnen unser Support telefonisch unter 05251/414130 oder per E-Mail an [support@maxcluster.de](mailto:support@maxcluster.de) zur Verfügung.

- [Erste Schritte](https://knowledge.maxcluster.de/erste-schritte#main-content)

    - [Migration zu maxcluster](https://knowledge.maxcluster.de/erste-schritte#migration-zu-maxcluster)
    - [Nutzerverwaltung](https://knowledge.maxcluster.de/erste-schritte#nutzerverwaltung)
    - [Zugriff](https://knowledge.maxcluster.de/erste-schritte#zugriff)
    - [Information für Neukunden](https://knowledge.maxcluster.de/erste-schritte#information-für-neukunden)
- [Application Center](https://knowledge.maxcluster.de/application-center#main-content)

    - [Persönliche Daten](https://knowledge.maxcluster.de/application-center#persönliche-daten)
    - [Übersicht über Kunden, Cluster und mehr](https://knowledge.maxcluster.de/application-center#übersicht-über-kunden-cluster-und-mehr)
    - [Verträge: Bestellung und Kündigung](https://knowledge.maxcluster.de/application-center#verträge-bestellung-und-kündigung)
    - [Rechnungen](https://knowledge.maxcluster.de/application-center#rechnungen)
    - [Bestellungen](https://knowledge.maxcluster.de/application-center#bestellungen)
    - [Erweiterungen](https://knowledge.maxcluster.de/application-center#erweiterungen)
    - [Partner-Portal](https://knowledge.maxcluster.de/application-center#partner-portal)
- [Managed Center](https://knowledge.maxcluster.de/managed-center#main-content)

    - [Dashboard](https://knowledge.maxcluster.de/managed-center#dashboard)
    - [Monitoring](https://knowledge.maxcluster.de/managed-center#monitoring)
    - [Webserver](https://knowledge.maxcluster.de/managed-center#webserver)
    - [Datenbanken](https://knowledge.maxcluster.de/managed-center#datenbanken)
    - [Suchengines](https://knowledge.maxcluster.de/managed-center#suchengines)
    - [Zugriff & Verwaltung](https://knowledge.maxcluster.de/managed-center#zugriff-verwaltung)
    - [ShopPerformance](https://knowledge.maxcluster.de/managed-center#shopperformance)
    - [ShopSecurity](https://knowledge.maxcluster.de/managed-center#shopsecurity)
    - [Analyse](https://knowledge.maxcluster.de/managed-center#analyse)
    - [Sicherheit](https://knowledge.maxcluster.de/managed-center#sicherheit)
    - [Systemdienste](https://knowledge.maxcluster.de/managed-center#systemdienste)
    - [Weitere Informationen](https://knowledge.maxcluster.de/managed-center#weitere-informationen)
- [SSL-Zertifikate](https://knowledge.maxcluster.de/ssl-zertifikate#main-content)

    - [Anleitung](https://knowledge.maxcluster.de/ssl-zertifikate#anleitung)
    - [Information](https://knowledge.maxcluster.de/ssl-zertifikate#information)
- [Domain](https://knowledge.maxcluster.de/domain#main-content)

    - [Informationen](https://knowledge.maxcluster.de/domain#informationen)
- [Tipps & Tricks](https://knowledge.maxcluster.de/tipps-tricks#main-content)

    - [Allgemein](https://knowledge.maxcluster.de/tipps-tricks#allgemein)
    - [ASV-Scan](https://knowledge.maxcluster.de/tipps-tricks#asv-scan)
    - [E-Mail](https://knowledge.maxcluster.de/tipps-tricks#e-mail)
    - [PCI-DSS](https://knowledge.maxcluster.de/tipps-tricks#pci-dss)
    - [Penetrationstest](https://knowledge.maxcluster.de/tipps-tricks#penetrationstest)
- [Allgemeines](https://knowledge.maxcluster.de/allgemeines)
- [Aktuelle Sicherheitsmeldungen](https://knowledge.maxcluster.de/aktuelle-sicherheitsmeldungen)
- [Magento](https://knowledge.maxcluster.de/magento#main-content)

    - [Information](https://knowledge.maxcluster.de/magento#information)
- [Shopware](https://knowledge.maxcluster.de/shopware#main-content)

    - [Anleitung](https://knowledge.maxcluster.de/shopware#anleitung)
- [Pimcore](https://knowledge.maxcluster.de/pimcore#main-content)

    - [Anleitung](https://knowledge.maxcluster.de/pimcore#anleitung)
    - [FAQ](https://knowledge.maxcluster.de/pimcore#faq)
- [Akeneo](https://knowledge.maxcluster.de/akeneo#main-content)

    - [Anleitung](https://knowledge.maxcluster.de/akeneo#anleitung)
    - [FAQ](https://knowledge.maxcluster.de/akeneo#faq)
- [Mage-OS](https://knowledge.maxcluster.de/mage-os#main-content)

    - [FAQ](https://knowledge.maxcluster.de/mage-os#faq)
- [Hyvä](https://knowledge.maxcluster.de/hyv%C3%A4#main-content)

    - [FAQ](https://knowledge.maxcluster.de/hyv%C3%A4#faq)

[![maxcluster-logo\_schwarz\_rot\_ohne\_claim\_cmyk](https://knowledge.maxcluster.de/hs-fs/hubfs/maxcluster-logo_schwarz_rot_ohne_claim_cmyk.png?width=200&height=31&name=maxcluster-logo_schwarz_rot_ohne_claim_cmyk.png "maxcluster-logo_schwarz_rot_ohne_claim_cmyk")](https://maxcluster.de/)

<https://www.xing.com/pages/maxclustergmbh> <https://www.linkedin.com/company/maxcluster-gmbh/> <https://www.facebook.com/> <https://www.youtube.com/@maxcluster>

Copyright © 2025, maxcluster GmbH