{"id":20140256,"url":"https://github.com/10quality/wordpress-maintenance-webhook","last_synced_at":"2026-05-13T19:32:22.874Z","repository":{"id":72365815,"uuid":"229377813","full_name":"10quality/wordpress-maintenance-webhook","owner":"10quality","description":"PHP script that enables maintenance webhooks in Wordpress.","archived":false,"fork":false,"pushed_at":"2020-01-09T04:29:28.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T23:26:24.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/10quality.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-21T04:50:21.000Z","updated_at":"2020-01-09T04:09:32.000Z","dependencies_parsed_at":"2023-11-30T10:15:11.138Z","dependency_job_id":null,"html_url":"https://github.com/10quality/wordpress-maintenance-webhook","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/10quality/wordpress-maintenance-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwordpress-maintenance-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwordpress-maintenance-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwordpress-maintenance-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwordpress-maintenance-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10quality","download_url":"https://codeload.github.com/10quality/wordpress-maintenance-webhook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwordpress-maintenance-webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32997562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T21:49:54.705Z","updated_at":"2026-05-13T19:32:22.869Z","avatar_url":"https://github.com/10quality.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wordpress Maintenance Webhook\n\nPHP script that enables maintenance webhooks in Wordpress.\n\nThese hooks are essentially useful when implementing **Continuous Deployment** (CD) or **Automated Deployments**.\n\n## How it works?\n\nThe script provides two webhooks that can be accessed through query string; one to enable Wordpress maintenance mode and another one to disable it.\n\n### Security\n\nThe script requires you to define a user and password, these credentials will be validated on each request, the script will only process webhooks if authentication has succeeded. All query string variables are sanitized.\n\nThe script is independent of Wordpress, meaning that it will not load any Wordpress library, file, database or configuration.\n\n### Disclaimer\n\nEven though we have taken into consideration many security concerns. This is not an official Wordpress script file, so use it at your own risk. The script requires at least **PHP 5.4**.\n\n## Configuration\n\nCopy the file `wp-maintenance-webhook.php` into the root folder of your Wordpress setup (where `wp-config.php` is found).\n\nEdit the file, and find the following code lines:\n\n```php\ndefine( 'HTTP_USER', 'YOUR USER NAME HERE' );\ndefine( 'HTTP_PASSWORD', 'YOUR PASSWORD HERE' );\n```\n\nReplace `YOUR USER NAME HERE` with your own user and `YOUR PASSWORD HERE` with your own password. Save the file.\n\n## Webhooks\n\nUse the following webhook sample to call your webhooks:\n\n```php\nhttp://{yourdomain.com}/wp-maintenance-webhook.php?auth={user}:{password}\u0026webhook={webhook}\n```\n\n| Replace | With |\n| --- | --- |\n| `{yourdomain.com}` | With your website's domain url. |\n| `{user}` | With your defined user. |\n| `{password}` | With your defined password. |\n| `{webhook}` | With the name of an available webhook. |\n\n### Webhook names\n\n| Name | Description |\n| --- | --- |\n| `enable_maintenance` | Enables Wordpress maintenance mode. |\n| `disable_maintenance` | Disables Wordpress maintenance mode. |\n\nSample of `enable_maintenance`:\n\n```php\nhttp://yourdomain.com/wp-maintenance-webhook.php?auth=user:password\u0026webhook=enable_maintenance\n```\n\n### Output\n\nBy default, the webhook will return a JSON response like this:\n\n```json\n{\n    \"error\": false,\n    \"time\": 1578542635,\n    \"message\": \"Maintenance mode enabled!\",\n    \"maintenance\":true\n}\n```\n\nWhen there is an error, only the `error` and `message` attributes will be returned.\n\n#### Formats\n\nChange the format of the output by adding an additional query string variable called `output`, like:\n\n```php\nhttp://yourdomain.com/wp-maintenance-webhook.php?auth=user:password\u0026webhook=enable_maintenance\u0026output=json\n```\n\n| Output format | Description |\n| --- | --- |\n| `json` or *empty* | Returns a JSON response. |\n| `html` | Returns a HTML response (data displayed as table). |\n\n## Coding Guidelines\n\nThe coding is a mix between PSR-2 and Wordpress PHP guidelines.\n\n## License\n\nFree software distributed under the terms of the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10quality%2Fwordpress-maintenance-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F10quality%2Fwordpress-maintenance-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10quality%2Fwordpress-maintenance-webhook/lists"}