question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Use existing PHP version installed

See original GitHub issue

I only have --php74 installed on my host.

When I created a new site, like below, it installed php72, even though I didn’t want it to.

root@ip-172:~# wo site create mydomain.com --wp --vhostonly
Adding repository for PHP, please wait...
Updating apt-cache              [OK]
Installing APT packages         [OK]
Configuring php7.2-fpm
Restarting php7.2-fpm           [OK]
Running pre-update checks       [OK]
Setting up NGINX configuration  [Done]
Setting up webroot              [Done]
Downloading WordPress           [Done]
Setting up database             [Done]
Configuring WordPress           [OK]
Installing WordPress            [OK]
Installing plugin nginx-helper  [OK]
Testing Nginx configuration     [OK]
Reloading Nginx                 [OK]
Successfully created site http://mydomain.com

The idea is that WordOps would detect that php74 is the only version installed and use that as the default. Another idea, would be to be able change the “default” for PHP versions to be a specific version instead of the provided 7.2. Such as wo set php --php74 and it would default to php74 instead of 72.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
vasilercommented, Jan 7, 2020

Can be an ideea a newer to older checker when is created a site and php flag is not present: -check if php7.4 is installed - then use php 7.4, else -check if php7.3 is installed - then use php 7.3 else use php 7.2

2reactions
dingmancommented, Jan 7, 2020

Correct, that’s what I did. It’s simply annoying that it would install php72 when I purposely don’t have it installed in the first place. Being able to set a default would make it a better user experience, than having to remember every single time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Change PHP Version in cPanel
Learn how to change the PHP version you use in cPanel on our newest servers.
Read more >
Upgrading or Downgrading PHP Versions
1. Make sure packages for your target version of PHP are installed · 2. Make sure PHP configuration for your target version is...
Read more >
How to Check PHP Version {2 Methods Explained}
Check your website's PHP version to avoid compatibility issues when installing new features. This tutorial shows steps to perform the check.
Read more >
phpversion - Manual
Return Values ¶. Returns the current PHP version as a string. If a string argument is provided for extension parameter, phpversion() returns the...
Read more >
How Do I Update the PHP Version on my Site?
Depending on the version of cPanel you're using, you will use either MultiPHP Manager or PHP Selector to modify your PHP version. PHP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found