Skip to content
  • GDPR-compliant
  • 100% hosting in Germany
  • Personal contact
  • Support included
  • Provisioning within 24 hours
PHP 1 min read

How do I use my own php.ini / PHP configuration via SSH?

To use your own php.ini file, you must first change the PHP configuration via the .user.ini file.

For further information on this, please refer to the PHP documentation: https://www.php.net/manual/de/configuration.file.per-user.php

You can then specify this file using the `-c` switch in your PHP command:

php -c /home/users/IhrUsername/PfadZuIhrer/.user.ini script.php

In this example, the `php.ini` file located at `/home/users/yourUsername/pathToYour/.user.ini` is used to run the `script.php` script with PHP. You can replace `/home/users/YourUsername/PathToYour/.user.ini` with the actual path to your `php.ini` file. The exact path depends on where you choose to store this file.

Specify the PHP version

Alternatively, you can also specify a particular PHP version in your PHP configuration by entering the full path to the desired PHP version. The version specified should correspond to the one configured in `php.ini`.

To do this, follow the instructions in the following help article: How do I specify different PHP versions via SSH?

Was this article helpful?

You might also be interested in:

Personal support

Of course, our support team is also happy to assist you personally. If you cannot find what you are looking for in our knowledge base or require personalised support, please do not hesitate to contact us. We’re here to help you and to ensure that your experience with our products and services is as smooth and enjoyable as possible.