Custom PHP Version Setup on Hostinger via SSH

Yauheni Pakala
1 min readAug 30, 2023

Introduction

In the realm of web development, customization is key, and Hostinger stands out for its empowering features. One such gem is the ability to harness custom PHP versions through SSH (Secure Shell). This guide delves into the steps to effectively utilize custom PHP versions on Hostinger’s platform.

Unleashing Custom PHP Versions

Hostinger’s SSH access is a gateway to advanced server management, allowing developers to fine-tune configurations. Among the array of possibilities, the use of custom PHP versions is a standout. Whether you’re updating an older project or leveraging the newest PHP release, this feature shines.

Step-by-Step Guide

1. Accessing SSH

Ensure you possess SSH access to your Hostinger account before proceeding. Acquire the necessary credentials and an SSH key pair. If SSH is new to you, Hostinger offers comprehensive documentation to simplify the process.

2. Finding Custom PHP Versions

Hostinger provides alternative PHP versions in the /opt/cloudlinux/alt-phpXX/ directory. "XX" denotes the version number;
for PHP 7.3, it's /opt/cloudlinux/alt-php73/.

3. Verifying PHP Version

Confirm the version you’re using by executing:

/opt/cloudlinux/alt-php73/root/usr/bin/php -v

This command showcases detailed PHP 7.3 information.

4. Running Scripts

Execute PHP scripts with your custom version, e.g., running Composer on PHP 7.3:

/opt/cloudlinux/alt-php73/root/usr/bin/php composer.phar

Conclusion

Choosing your PHP version grants flexibility, meeting diverse project needs in the ever-evolving web development landscape. Happy coding!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Yauheni Pakala
Yauheni Pakala

Written by Yauheni Pakala

I’m a software engineer. I’m a fan of technology, cross-platform development, and programming.

Responses (1)

Write a response

You're doing God's work