Installation
Requirements
Magento 2.4.x — tested on 2.4.9, compatible with previous 2.4.* releases. PHP 8.1–8.5. Magento cron must be running (the switch runs daily). Compatible with both the default Luma theme and the Hyva theme. Depends on the free codingrow/module-core module, installed automatically.
Setup steps
- Add the credentials you'll receive by email to
auth.jsonin your Magento project root:{ "http-basic": { "repo.codingrow.com": { "username": "...", "password": "..." } } } composer config repositories.codingrow composer https://repo.codingrow.comcomposer require codingrow/module-auto-switch-homebin/magento module:enable Codingrow_AutoSwitchHomebin/magento setup:upgrade && bin/magento setup:di:compile- Paste your license key into Admin → Stores → Configuration → Codingrow Extensions → Auto Switch Home → License → License Key, save, then
bin/magento cache:flush.
Configuration
Open Admin → Stores → Configuration → Codingrow Extensions → Auto Switch Home. Enter your License Key, set Enable automatic home switching to Yes, and build the Switch calendar.
| Setting | What it does | Default | Notes |
|---|---|---|---|
| License Key | The license key issued for this domain. | — | Accepts a single-module key or a Codingrow subscription key. Flush the cache after pasting. |
| Enable automatic home switching | Turns the daily switching on. | No | On first enable the current home page is remembered; on disable it is restored. |
| Switch calendar | The list of rules. Each row is a recurring day + month and the CMS page to show from that date on. | — | Add as many rows as you like. The dropdown lists your Magento CMS pages. |
Uninstallation
Set Enable automatic home switching to No and save — your original home page is restored automatically. To remove the module entirely: bin/magento module:disable Codingrow_AutoSwitchHome then composer remove codingrow/module-auto-switch-home.
User guide
The switch calendar
Each rule is a recurring day + month (no year) mapped to one of your CMS pages. You define the calendar once and it repeats every year. Add one row per transition — there is no limit.
Which page is active today
The active rule is the one whose day/month is the most recent that has already occurred. With 5 December → Christmas and 26 December → Winter, from 5 to 25 December the home is Christmas, and from 26 December it is Winter. The end of the year wraps correctly: in early January the last December rule stays active until the first rule of the new year is reached. Rows with impossible dates (e.g. 31 February) are ignored.
Daily task and instant apply
A daily cron job (codingrow_autoswitchhome_apply, default 00:10, in its own cron group) sets the home page to the active rule. The change is also applied immediately when you save the configuration, so you don't have to wait for the cron.
Restore and cache
Non-destructive: the module stores your original home page the first time you enable it and restores it automatically when you disable it. Cache: it refreshes the config and full-page cache only on the days the home page actually changes — a handful of times per year. No reindex is ever required: changing which CMS page is the home is a configuration change, not a catalog index change.
Hyva and Luma support
The module is theme-agnostic. It only changes which CMS page is the home page, so it works identically on the Hyva theme and the default Luma theme, with no template changes.
License
The license is issued for one domain and can be a single-module key (Auto Switch Home) or a Codingrow subscription key (all modules). Without a valid license the module does nothing. Updates are included within the same major version.