craftcms / server-check
Craft CMS Server Check
Installs: 3 016 896
Dependents: 1
Suggesters: 0
Security: 0
Stars: 67
Watchers: 5
Forks: 15
Open Issues: 1
Language:Hack
- 5.x-dev
- 5.0.2
- 5.0.1
- 5.0.0
- 2.x-dev
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-11-16 15:45:42 UTC
README
This script checks if a web server meets the minimum requirements to run a Craft 4 installation.
Usage
Run the following in a terminal of any *nix environment (e.g. Linux, MacOS, WSL):
curl -Lsf https://raw.githubusercontent.com/craftcms/server-check/HEAD/check.sh | bash
Note You can review the substance of this script before execution.
Alternatives
Web UI
Upload the server/
folder to your web server’s web root and load checkit.php
from a browser to get an HTML report.
Remote CLI
The same server/
folder can be uploaded anywhere on your server and used via the command line to get a plain-text report:
php checkit.php
This is equivalent to the default usage instructions, above.
Shell exit codes
If all requirements are met, the script will return an exit code of 0
.
The script will return an exit code of 1
if:
-
Any errors are encountered, or requirements are not met
-
An environment variable
CRAFT_STRICT_SERVER_CHECK=1
is set, and any warnings are found:CRAFT_STRICT_SERVER_CHECK=1 php server/checkit.php
This can be especially useful in a CI/CD pipeline, or a Dockerfile
, where you want the process to fail if the check does not pass:
# Dockerfile FROM php:8.0-fpm RUN curl -Lsf https://raw.githubusercontent.com/craftcms/server-check/HEAD/check.sh | bash
The official Craft Docker Images run this check when building to be certain all of Craft's requirements are met in any built image.