The version of PHP on OS X Server 5.x is v.5.3.x. As of this writing, the current distro of PHP on Homebrew is v.7.4.12. You will lose the ability to control PHP loading from the GUI.
To prep, you should have prepared a phpinfo.php file on your website in an orphan directory so you can check all the modules that load with PHP. It is simply a text file with the name phpinfo.php and the content is:
Don’t worry if PHP is currently running.
Install PHP via Homebrew:
brew install php
If you’re running WordPress on your own Mac OS X Server and have installed an updated version of PHP using Homebrew, you may have a directory mismatch that will prevent pecl from successfully installing imagemagick.