Skip to content
HostingSquad
To websitehostingsquad.nl
Search
EN

How do I change the PHP version on my VPS?

Updated on

On a VPS, you choose in DirectAdmin which PHP version your website uses. You need this when your website or a plugin requires a different PHP version. How you choose the version depends on whether your VPS has CloudLinux.

Before you start

  • You need the login details of the DirectAdmin admin user.
  • These steps apply to DirectAdmin, the control panel that comes as standard with every VPS. If you chose Plesk or cPanel, they do not apply.
  • If you ordered CloudLinux with your VPS, follow the steps under "With CloudLinux". Otherwise, follow the steps under "Without CloudLinux".
  • DirectAdmin is in English by default, so the menus and buttons in this article are named as you see them on screen. If your DirectAdmin is set to Dutch, DirectAdmin may show the Dutch names, such as Toon Alle Gebruikers instead of Show All Users, Zich voordoen als instead of Impersonate, Domeinen instead of Domains, PHP Versie Kiezer instead of PHP Version Selector and Extra Programma's instead of Extra Features. Select PHP version has the same name in both languages.

Without CloudLinux

You choose the PHP version per domain name, with DirectAdmin's PHP Version Selector.

  1. Log in to DirectAdmin as admin

  2. Open Show All Users

    Under Account Manager, click Show All Users.

  3. Open the user

    Click the name of the user that uwdomeinnaam.nl belongs to.

  4. Continue as the user

    On the user's page, click Impersonate. You are now working in DirectAdmin as this user.

  5. Open Domains

    Under Account Manager, click Domains.

  6. Choose your domain name

    Click uwdomeinnaam.nl. The Modify uwdomeinnaam.nl page opens.

  7. Open the PHP Version Selector

    At the top of the page, click PHP Version Selector.

  8. Choose the PHP version

    In the PHP Version selector window, choose the version you want.

  9. Save your choice

    Click Save. Within 5 minutes, your website runs on the new PHP version.

With CloudLinux

You choose the PHP version with CloudLinux's PHP Selector, which is called Select PHP version in DirectAdmin.

  1. Log in to DirectAdmin as admin

  2. Open Show All Users

    Under Account Manager, click Show All Users.

  3. Open the user

    Click the name of the user that uwdomeinnaam.nl belongs to.

  4. Continue as the user

    On the user's page, click Impersonate. You are now working in DirectAdmin as this user.

  5. Open Select PHP version

    Under Extra Features, click Select PHP version.

  6. Choose the PHP version

    Under PHP version, click the current version, marked (current), and choose the version you want.

  7. Save your choice

    Click Set as current. Within 5 minutes, your website runs on the new PHP version.

Not working?
  • Is there no PHP Version Selector button? Then check whether, after Impersonate, Select PHP version is listed under Extra Features. If so, your VPS has CloudLinux and you follow the steps under "With CloudLinux". If it is not there either, contact us (in Dutch): the choice between PHP versions has to be enabled on the server.
  • Does a domain name still use a different PHP version after Set as current? Then a different version may have been chosen for that domain name in DirectAdmin's PHP Version Selector, and the choice in Select PHP version does not apply to that domain name. In that case, contact us (in Dutch).

Related articles