Install a PHP extension through the supported DirectAdmin CustomBuild workflow so it remains associated with the managed PHP stack. A website needs the extension in its selected runtime, which may differ from the default shell PHP version.
IN THIS ARTICLE
Check access and requirements
Use an authorized server administrator and verify the application extension requirement. Check supported PHP releases, system-library dependencies and whether CustomBuild already manages the extension. Back up configuration and plan for affected PHP service reloads.
01 Add a PHP extension through DirectAdmin CustomBuild
- Inspect the domain PHP release and current modules through an appropriate protected diagnostic. Check CLI modules only as an additional test, not proof of the website runtime.
- Read the current CustomBuild PHP extension documentation and
da build opt_helpfor the exact option and build command. - Enable the supported extension option and build the required extension through CustomBuild. For extensions such as Imagick, current builds use the documented php_-prefixed component workflow rather than arbitrary distribution PHP packages.
- Review the complete build result and confirm the extension loads without startup warnings. Apply the supported service reload when needed.
- Test the application operation that requires the module, such as processing a representative image, using a harmless test file. Review memory and policy limits that may still affect the operation.
02 Example: enable and build Imagick through CustomBuild
On a DirectAdmin server where the installed CustomBuild supports php_imagick, an authorized administrator can use the following after recording the existing option and planning the affected PHP maintenance window:
da build set php_imagick yes
da build php_imagick
The first command changes the managed option; the second builds the extension. Read the complete result before continuing. This is a server-level change, not a command for an ordinary hosting account. Confirm the option in da build opt_help for your installed version and do not substitute an unrelated distribution PHP package.
After the supported reload, verify extension_loaded('imagick') in a protected diagnostic served by the affected domain, then process a harmless representative image. Check every affected PHP release and remove the diagnostic. A successful CLI check alone does not establish that the website has the extension.
How do I confirm the PHP extension is loaded?
Confirm the extension appears in the specific web runtime and its version is compatible. Test each affected PHP release if the server hosts more than one. Remove temporary diagnostics and record the administrative change.
Resolve setup problems
If the build fails, inspect the first compiler or missing-library error. Installing a distribution package for a different PHP binary may not fix a CustomBuild runtime. If loading the extension causes errors, disable the targeted module through the supported configuration and restore service before investigating. Do not rebuild the entire server stack as the first response to one module issue.