定制 devuri/advanced-custom-site-status 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

devuri/advanced-custom-site-status

最新稳定版本:v0.2.7

Composer 安装命令:

composer require devuri/advanced-custom-site-status

包简介

Adds a custom health check endpoint with rate limiting to your WordPress site. Supports a customizable endpoint slug through a constant.

README 文档

README

Advanced Custom Site Status is a WordPress plugin that adds a custom health check endpoint with rate limiting to your WordPress site. This endpoint is specifically designed to check database connectivity, ensuring your WordPress site's database is accessible and responsive. The plugin supports a customizable endpoint slug through a constant, allowing for personalized integration into your WordPress environment.

Features

  • Custom Health Check Endpoint: Provides a dedicated URL to check the site's health, focusing on database connectivity.
  • Rate Limiting: Protects your site from potential abuse by limiting the number of health check requests within a specific time frame.
  • Customizable Endpoint Slug: Allows the setting of a custom slug for the health check endpoint through a WordPress constant.

Requirements

  • WordPress 5.3.0 or higher
  • PHP 7.3.5 or higher

Installation

Via Composer

To install the plugin using Composer, run the following command:

composer require devuri/advanced-custom-site-status

Replace your-vendor with your actual vendor name on Packagist if you have submitted the plugin there.

Manual Installation

  1. Download the plugin files from the GitHub repository.
  2. Upload the advanced-custom-site-status directory to your WordPress site's wp-content/plugins/ directory.
  3. Activate the plugin through the 'Plugins' menu in WordPress.

Configuration

To customize the endpoint slug, define the CUSTOM_HEALTH_CHECK_SLUG constant in your wp-config.php file like so:

define('CUSTOM_HEALTH_CHECK_SLUG', 'my-custom-health-endpoint');

If the constant is not defined, the plugin will default to using health-check-site-status as the endpoint slug.

Usage

After installation and activation, the health check can be accessed via the configured slug (or the default slug if not configured). For example:

https://yourdomain.com/my-custom-health-endpoint

This URL will return a JSON response indicating the health status of your WordPress site's database.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues to improve the plugin.

License

The plugin is licensed under the GPLv2. For more details, see the License URI.

统计信息

  • 总下载量: 208
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2024-02-17