What does compile mean?
PHP is the language that runs many websites. Compiling means turning the program's source code into a program the server can run. It is like baking a cake from a recipe. It can take a few minutes.
CustomBuild is DirectAdmin's tool for installing and updating server software, such as PHP, Apache and MySQL. You can tell it to rebuild just one PHP version. That is faster and safer than rebuilding all.
Before you start
Compiling uses a lot of server power. Your sites may be slow while it runs. Take a snapshot or backup first. Pick a quiet time.
Steps in the DirectAdmin panel
- Log in to DirectAdmin as admin.
- Open CustomBuild. It may be in Server Manager or the admin menu. Some servers show it as CustomBuild 2.0.
- Find the PHP settings. They have names like PHP 1 Release, PHP 2 Release and so on.
- Choose the version in the slot you want, for example 8.2.
- Click Save.
- Click the button to update the build files. It may be called Update Scripts.
- Click the button to build PHP. It may be called Rebuild PHP or Build PHP for that slot.
- Wait until it finishes. A log on the page shows progress.
Steps over SSH
SSH is a safe way to type commands on a server from far away.
- Connect to your server as root.
- Go to the CustomBuild folder:
cd /usr/local/directadmin/custombuild
This moves you into the CustomBuild folder.
- Update the build scripts:
./build update
This downloads the latest list of versions.
- Build the PHP version you set in the options:
./build php n
This rebuilds the PHP versions you chose in CustomBuild. Other software is left alone. Run ./build versions first to see what is set. Check the CustomBuild help for your version if the command differs.
After the build
- Open the websites that use that PHP version.
- Look at the build log if a site shows an error.
- Ask support if the build failed.
Quick recap
- Compiling builds PHP from source code.
- CustomBuild lets you rebuild just one version.
- Take a snapshot first, and build at a quiet time.
- Test your sites after.
- Ask support if the build fails.