Prepare site Redis defaults

Prepare Redis defaults for the intended site, then review the complete environment file before saving.

Prepare Redis defaults for the intended site, then review the complete environment file before saving. This walkthrough uses real product views and fictional Northstar Studio text. No site file is read or written, and no Redis connection, installation, service restart or application command runs.

Demonstration: Herne 3.55.43, English interface and synthetic English voice, fictional Northstar Studio. Every environment value is synthetic and incomplete. No site file access, Save, Redis connection, installation, service restart or command runs. Complete text and subtitles are available in six languages.

Watch the walkthrough

English audio · 6 min 28 sec · Subtitles in all six site languages.

1. Open the correct site and protect its environment

Prepare Redis defaults for the intended site, then review the complete environment file before saving. This walkthrough uses real product views and fictional Northstar Studio text. No site file is read or written, and no Redis connection, installation, service restart or application command runs.

Open the site and choose Redis defaults from Settings. Check the domain first. This small settings page opens the environment editor with prepared defaults; it is not a Redis service dashboard. Its button is a real request on a live panel, even though it does not save the file.

The settings page and defaults helper require permission to update the site. Reading an environment file can expose credentials, so keep its contents private. Our example deliberately contains no real keys or database passwords. Do not copy a live environment file into a public screenshot, video, support post or shared note.

Settings menu with Redis defaults for fictional studio.example.test.
Redis defaults page with Apply Redis defaults; no request is submitted.

2. Confirm readiness and the preview source

Before loading defaults, confirm that the application supports the intended Redis client, cache store, sessions and queue configuration. Have the administrator verify the endpoint and the relevant web and command-line PHP extensions. Loading this text neither installs Redis or phpredis nor proves that the site's actual runtime can connect.

The helper starts from the saved .env in the site's project web_root, independently of the selected public document root. If that file exists, its text wins, including an empty file. This is a new server-side preview from saved content; it is not a merge of whatever is currently unsaved in another editor tab.

When .env is absent, the helper uses .env.example if available; otherwise it starts with empty text. The template is only a starting point, not your complete production configuration. A missing-file badge can remain visible beside a loaded-defaults message because preparing text has not created or saved .env.

Synthetic saved environment with database drivers and CUSTOM_LABEL=keep-me.
Synthetic template-based preview with a missing .env badge and loaded-defaults message.

3. Review all seven defaults

The defaults set CACHE_STORE, SESSION_DRIVER and QUEUE_CONNECTION to redis. That prepares three separate application concerns at once; it is not just a cache toggle. Moving sessions can affect sign-ins, and changing a queue connection does not move jobs already stored in another backend. Plan each transition before saving.

The connection defaults select phpredis, host 127.0.0.1, port 6379 and password null. They can replace an existing canonical connection setting. These are assumptions, not discovered site credentials or verified access. Review your actual endpoint, authentication and isolation requirements privately; do not remove required authentication to match this example.

The helper replaces lines beginning with an exact uppercase key followed immediately by equals, or appends a missing key. Other text is generally retained, but formatting is not guaranteed byte for byte. Spaced, exported, legacy or duplicate definitions need manual review. Your application must actually read these keys; a preview does not validate its configuration.

Key Default
CACHE_STORE redis
SESSION_DRIVER redis
QUEUE_CONNECTION redis
REDIS_CLIENT phpredis
REDIS_HOST 127.0.0.1
REDIS_PASSWORD null
REDIS_PORT 6379
Unsubmitted seven-value Redis preview with unrelated synthetic settings retained.

4. Preserve unsaved edits and review the preview

Before loading defaults, preserve any unsaved editor work in a private recovery copy. The regular site helper reads saved files again and does not receive the current textarea. Even its confirmation dialog does not merge unsaved text. The wizard has a different flow; do not assume its preservation behavior applies here.

The Redis defaults settings button posts directly to the preview helper. In the environment editor, Apply Redis defaults first opens a confirmation dialog. Both paths prepare editor text without saving. Read the dialog, preserve unsaved changes and proceed only when you intend to replace the current editor view with a fresh preview.

After preparation, read the loaded-defaults message and compare all seven values with the prior configuration. Check that unrelated application settings and your intended changes remain complete. The file-exists badge describes file presence, not whether the preview was saved. No Redis connectivity or application-health test is implied by this screen.

Synthetic unsaved CUSTOM_LABEL=unsaved-draft beside the original database drivers.
Apply Redis defaults confirmation changes editor values; the dialog is not submitted.

5. Save deliberately and verify application behavior

Save .env submits the complete editor content and replaces the site's environment file; it does not save just the Redis keys. On this editor page, Control or Command plus S can submit the form even outside the text field. Review the whole file and a private recovery copy before either action. Our demonstration does not submit Save.

Saving a file is separate from application configuration activation. Cached configuration and long-running workers may continue using earlier values. Use the application's reviewed cache and worker procedure for its actual version and runtime. Do not run broad cache clearing or service restarts just because the editor displays Redis defaults, especially on shared backends.

After an authorized save and activation, reopen the editor to inspect saved values, then verify application behavior independently. Check cache operations, session continuity and a controlled queue job using the intended connection and worker. A panel-level readiness result or successful save alone does not establish that all three functions use the expected backend safely.

Action Effect Boundary
Apply Redis defaults Prepares text from saved .env, template or empty source No file save or Redis connection
Save .env / Ctrl/Cmd+S Replaces the complete environment file Separate application activation and verification

6. Handle missing files and recover carefully

If both source files are absent, the preview can contain only the seven Redis defaults. Do not save that as a complete application environment without supplying and reviewing the required configuration. The helper does not generate an application key, database credentials, connection isolation or a migration plan. Missing-file status is a prompt to investigate, not proof of readiness.

If a preview or save behaves unexpectedly, preserve your private prior copy and the error context. Reopen the saved file and establish the actual application state before retrying. Do not assume a displayed textarea or success message proves durable content, valid syntax, connectivity or migrated data. Keep credentials out of shared diagnostics.

If verification fails, stop unrelated changes and use the application's approved recovery procedure with the private prior configuration. Restoring environment text does not automatically restore sessions, cached data or jobs written to a different backend. Reconcile those effects separately with the administrator, then verify the recovered application before another transition.

Synthetic preview containing only seven Redis defaults with both source files absent.
Herne documentation