Set php8.0 as default

This commit is contained in:
VirtuBox
2022-01-25 16:29:13 +01:00
parent c68d173f42
commit 9743a60742
3 changed files with 11 additions and 10 deletions

View File

@@ -43,7 +43,7 @@
- **Easy to install** : One step automated installer with migration from EasyEngine v3 support - **Easy to install** : One step automated installer with migration from EasyEngine v3 support
- **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation - **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation
- **Custom Nginx build** : Nginx 1.18.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support - **Custom Nginx build** : Nginx 1.18.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support
- **Up-to-date** : PHP 7.2, 7.3 & 7.4, MariaDB 10.5 & Redis 6.0 - **Up-to-date** : PHP 7.2, 7.3, 7.4, 8.0 & 8.1 - MariaDB 10.5 & Redis 6.0
- **Secured** : Hardened WordPress security with strict Nginx location directives - **Secured** : Hardened WordPress security with strict Nginx location directives
- **Powerful** : Optimized Nginx configurations with multiple cache backends support - **Powerful** : Optimized Nginx configurations with multiple cache backends support
- **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support - **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support
@@ -64,7 +64,6 @@
#### Also compatible #### Also compatible
- Ubuntu 16.04 LTS (Xenial)
- Debian 9 (Stretch) - Debian 9 (Stretch)
- Debian 10 (Buster) - Debian 10 (Buster)
- Raspbian 9 (Stretch) - Raspbian 9 (Stretch)
@@ -135,6 +134,8 @@ wo site create example.com --proxy=127.0.0.1:3000 # create example.com with ngi
wo site update example.com --php72 # switch to PHP 7.2 wo site update example.com --php72 # switch to PHP 7.2
wo site update example.com --php73 # switch to PHP 7.3 wo site update example.com --php73 # switch to PHP 7.3
wo site update example.com --php74 # switch to PHP 7.4 wo site update example.com --php74 # switch to PHP 7.4
wo site update example.com --php80 # switch to PHP 8.0
wo site update example.com --php81 # switch to PHP 8.1
``` ```
### Sites secured with Let's Encrypt ### Sites secured with Let's Encrypt

View File

@@ -79,7 +79,7 @@ keylength = "ec-384"
[php] [php]
### Default PHP version ### Default PHP version
version = 7.4 version = 8.0
[mariadb] [mariadb]

View File

@@ -884,7 +884,7 @@ def site_package_check(self, stype):
(pargs.php74 and pargs.php80) or (pargs.php80 and pargs.php81) or (pargs.php74 and pargs.php80) or (pargs.php80 and pargs.php81) or
(pargs.php72 and pargs.php80) or (pargs.php72 and pargs.php81) or (pargs.php72 and pargs.php80) or (pargs.php72 and pargs.php81) or
(pargs.php73 and pargs.php81) or (pargs.php74 and pargs.php81) or (pargs.php73 and pargs.php81) or (pargs.php74 and pargs.php81) or
(pargs.php80 and pargs.php81)): (pargs.php80 and pargs.php81)):
Log.error( Log.error(
self, "Error: two different PHP versions cannot be " self, "Error: two different PHP versions cannot be "
"combined within the same WordOps site") "combined within the same WordOps site")
@@ -894,8 +894,8 @@ def site_package_check(self, stype):
stype in ['php', 'mysql', 'wp', 'wpsubdir', stype in ['php', 'mysql', 'wp', 'wpsubdir',
'wpsubdomain']): 'wpsubdomain']):
Log.debug(self, "Setting apt_packages variable for PHP") Log.debug(self, "Setting apt_packages variable for PHP")
php_check = 'php7.3-fpm' php_check = 'php8.0-fpm'
php_to_setup = WOVar.wo_php73 php_to_setup = WOVar.wo_php80
if self.app.config.has_section('php'): if self.app.config.has_section('php'):
config_php_ver = self.app.config.get( config_php_ver = self.app.config.get(
'php', 'version') 'php', 'version')
@@ -915,11 +915,11 @@ def site_package_check(self, stype):
php_check = 'php8.1-fpm' php_check = 'php8.1-fpm'
php_to_setup = WOVar.wo_php81 php_to_setup = WOVar.wo_php81
else: else:
php_check = 'php7.3-fpm' php_check = 'php8.0-fpm'
php_to_setup = WOVar.wo_php73 php_to_setup = WOVar.wo_php80
else: else:
php_check = 'php7.3-fpm' php_check = 'php8.0-fpm'
php_to_setup = WOVar.wo_php73 php_to_setup = WOVar.wo_php80
if not (WOAptGet.is_installed(self, php_check)): if not (WOAptGet.is_installed(self, php_check)):
apt_packages = apt_packages + php_to_setup + WOVar.wo_php_extra apt_packages = apt_packages + php_to_setup + WOVar.wo_php_extra