{"id":22114063,"url":"https://github.com/carlcs/craft-maintenance","last_synced_at":"2025-07-25T08:31:24.059Z","repository":{"id":62499662,"uuid":"52306013","full_name":"carlcs/craft-maintenance","owner":"carlcs","description":"Maintenance plugin for Craft CMS","archived":false,"fork":false,"pushed_at":"2017-09-07T15:56:06.000Z","size":69,"stargazers_count":69,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-27T12:21:06.130Z","etag":null,"topics":["craft-plugin","craftcms"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carlcs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-22T21:09:43.000Z","updated_at":"2024-04-27T12:21:06.131Z","dependencies_parsed_at":"2022-11-02T09:46:02.736Z","dependency_job_id":null,"html_url":"https://github.com/carlcs/craft-maintenance","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlcs%2Fcraft-maintenance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlcs%2Fcraft-maintenance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlcs%2Fcraft-maintenance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlcs%2Fcraft-maintenance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlcs","download_url":"https://codeload.github.com/carlcs/craft-maintenance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227544347,"owners_count":17785198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["craft-plugin","craftcms"],"created_at":"2024-12-01T11:08:41.316Z","updated_at":"2024-12-01T11:08:42.970Z","avatar_url":"https://github.com/carlcs.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maintenance plugin for Craft CMS\n\n![screenshot][1]\n\nThe plugin provides tools to help you do maintenance on your Craft CMS website:\n\n- Display a “Maintenance in progress” overlay in the Control Panel when the site is undergoing [scheduled maintenance](#maintenance-modes)\n- [Announce upcoming maintenance](#maintenance-announcements) on the dashboard and with notification banners\n- Leave your users [(maintenance related) messages](#maintenance-messages) on the dashboard widget\n- Access maintenance related info from your templates using the provided [template variables](#template-variables)\n\n## Installation\n\nThe plugin is available on Packagist and can be installed using Composer. You can also download the [latest release][2] and copy the files into craft/plugins/maintenance/.\n\n```\n$ composer require carlcs/craft-maintenance\n```\n\n## Maintenance Announcements\n\nSet up maintenance announcements or \u003ca name='maintenance-messages' /\u003emessages from the plugin’s settings page. You can use markdown to add links, or to format the message. To configure scheduled maintenance you have to set a start date in the announcement’s settings and enable [“Backend Maintenance”](#backend-maintenance) and/or [“Frontend Maintenance”](#frontend-maintenance).\n\nCreate a new “Maintenance Announcements” widget to display all notifications on the users’ Dashboards. Upcoming maintenance will also be announced with a banner notification.\n\n## Maintenance Modes\n\n\u003ca name='backend-maintenance' /\u003eWhen backend maintenance mode is active, users navigating the Control Panel will be shown a full screen “Maintenance in progress” overlay. It informs them about the undergoing maintenance, in order to prevent from useless data entry.\n\n\u003ca name='frontend-maintenance' /\u003eThe frontend maintenance mode redirects all (frontend) requests to /503, your “service unavailable” page. You can exclude URLs from being redirected and whitelist visitor IP addresses in the plugin settings.\n\n**Note:** the plugin doesn’t do “content freeze” in a way, that it actually prevents data from being saved or changed in the database. That being said, there are template variables and plugins API provided.\n\n## Settings\n\nThe plugin can be configured from a craft/config/maintenance.php config file or from Settings/Maintenance.\n\nIn Settings/Users you can assign user permissions to configure the  “Maintenance in progress” overlay or to grant access for individual user groups while frontend maintenance is carried out.\n\n## Template Variables\n\nThe plugin provides template variables to get the active announcement model, or to check whether the site is currently undergoing maintenance.\n\n#### `isCpMaintenance`\n\nReturns whether the Control Panel is currently undergoing maintenance.\n\n```twig\n{{ isCpMaintenance ? 'Shop closed' : '\u003ca href=\"/shop\"\u003eShop\u003c/a\u003e' }}\n```\n\n#### `isSiteMaintenance`\n\nReturns whether the site is currently undergoing maintenance.\n\n```twig\n{% set reason = isSiteMaintenance ? 'scheduled' : 'unscheduled' %}\n```\n\n#### `getAnnouncement( timeInAdvance )`\n\nReturns the latest, either currently active or soon to be activated maintenance announcement.\n\n```twig\n{% set announcement = craft.maintenance.getAnnouncement('2 hours') %}\n\n{% if announcement and announcement.blockSite %}\n    \u003cspan\u003e{{ announcement.message }}\u003c/span\u003e\n{% endif %}\n```\n\n## Planned features\n\n- Quick set up maintenance via environment variable\n\n\n  [1]: https://github.com/carlcs/craft-maintenance/blob/master/resources/screenshot.png\n  [2]: https://github.com/carlcs/craft-maintenance/releases/latest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlcs%2Fcraft-maintenance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlcs%2Fcraft-maintenance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlcs%2Fcraft-maintenance/lists"}