The default path to PHP on Ultra Web Hosting servers is /usr/bin/php. But if you need a specific PHP version, or if you're looking for paths to other common binaries (Perl, Python, sendmail), this guide has them all. These paths are used in cron jobs, CGI scripts, and application configuration files.
PHP Path: /usr/bin/php
This is the default PHP binary on all Ultra Web Hosting servers. It uses whatever PHP version is set as your account default in cPanel > Select PHP Version.
- ✓ Default PHP:
/usr/bin/php - ✓ PHP 8.1:
/usr/bin/php8.1or/opt/cpanel/ea-php81/root/usr/bin/php - ✓ PHP 8.2:
/usr/bin/php8.2or/opt/cpanel/ea-php82/root/usr/bin/php - ✓ PHP 8.3:
/usr/bin/php8.3or/opt/cpanel/ea-php83/root/usr/bin/php
01. PHP Paths
| Version | Short Path | Full EA Path |
|---|---|---|
| Default (account setting) | /usr/bin/php |
Uses your PHP Selector version |
| PHP 7.4 | /usr/bin/php7.4 |
/opt/cpanel/ea-php74/root/usr/bin/php |
| PHP 8.0 | /usr/bin/php8.0 |
/opt/cpanel/ea-php80/root/usr/bin/php |
| PHP 8.1 | /usr/bin/php8.1 |
/opt/cpanel/ea-php81/root/usr/bin/php |
| PHP 8.2 | /usr/bin/php8.2 |
/opt/cpanel/ea-php82/root/usr/bin/php |
| PHP 8.3 | /usr/bin/php8.3 |
/opt/cpanel/ea-php83/root/usr/bin/php |
In most cases, use /usr/bin/php. This automatically follows whatever version you set in cPanel > Select PHP Version, so it stays correct even if you change versions later. Only use a version-specific path if you need a cron job or script to run on a different PHP version than your website.
02. Other Common Paths
| Binary | Path | Used For |
|---|---|---|
| Perl | /usr/bin/perl |
CGI scripts, shebang line |
| Python 3 | /usr/bin/python3 |
Python scripts, CGI |
| Sendmail | /usr/sbin/sendmail |
PHP mail(), contact forms |
| Bash | /bin/bash |
Shell scripts |
| MySQL/MariaDB | /usr/bin/mysql |
CLI database access, cron backups |
| mysqldump | /usr/bin/mysqldump |
Database backups via cron |
| curl | /usr/bin/curl |
HTTP requests from scripts/cron |
| wget | /usr/bin/wget |
File downloads from scripts/cron |
03. Finding Paths Yourself
If you need to find the path to any binary on the server, use the which command in cPanel > Terminal or via SSH:
which php
which perl
which python3
which sendmail
which mysql
For PHP specifically, you can also check the version that /usr/bin/php points to:
php -v
This shows the PHP version and build info, confirming which version runs when you use the default /usr/bin/php path.
04. Using Paths in Scripts and Cron Jobs
Cron Jobs
When setting up a cron job in cPanel, use the full path to the PHP binary:
/usr/bin/php /home/yourusername/public_html/cron-script.php
To run a cron with a specific PHP version:
/usr/bin/php8.2 /home/yourusername/public_html/cron-script.php
See our Cron Job Guide for full setup instructions.
CGI Scripts (Perl)
The first line of a Perl CGI script must be the path to Perl:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello from Perl";
Make sure the file has 755 permissions and Unix-style line endings (LF, not CRLF). CGI scripts can be placed in the cgi-bin directory or anywhere under public_html. For more on CGI, see our CGI Guide.
Perl Version and Modules
Our servers run Perl 5. To check the exact version on your server:
perl -v
A wide range of CPAN modules are pre-installed. Common modules used by web applications include DBI, CGI, LWP, Net::SMTP, MIME::Lite, and many others. You can check if a specific module is installed with:
perl -MModule::Name -e 'print "Installed\n"'
For example: perl -MDBI -e 'print "Installed\n"'. If the module is missing, you'll see an error. Open a support ticket with the module name and we can install any CPAN module as long as it does not pose a security risk.
WordPress wp-config.php
Some WordPress guides reference PHP paths for custom configurations. The paths in this article apply to all Ultra Web Hosting servers. For database connection, use localhost as the host (port 3306). See our port reference.
Need a Path That's Not Listed?
If you need the path to a specific binary or library, open a ticket and let us know what you're trying to run.
Open a Support TicketQuick Recap: Server Paths
The paths you'll use most often:
- PHP: /usr/bin/php - uses your account's PHP version setting
- Perl: /usr/bin/perl - for CGI scripts
- Sendmail: /usr/sbin/sendmail - for PHP mail() and contact forms
- MySQL: /usr/bin/mysql - for CLI database access
- Use
whichcommand - to find the path to anything else
Last updated March 2026 · Browse all PHP articles · See also: Port Reference | Change PHP Version
