You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: promote recommended PHP and database versions in init and docs
- Updated lando init to set PHP 8.3 and MySQL 8.0 in generated Landofile
- Added wordpress-recommended example with explicit version configuration
- Updated docs to recommend always setting explicit php and database versions
- Bumped @lando/php to ^1.11.1
Copy file name to clipboardExpand all lines: docs/config.md
+29-12Lines changed: 29 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,18 +25,32 @@ config:
25
25
vhosts: SEE BELOW
26
26
```
27
27
28
+
::: warning Always set explicit versions!
29
+
We **strongly recommend** always setting `php` and `database` versions in your Landofile rather than relying on defaults. Defaults may change between releases and could result in unexpected behavior. For WordPress, the current recommended versions are:
30
+
31
+
```yaml
32
+
recipe: wordpress
33
+
config:
34
+
php: '8.3'
35
+
database: mysql:8.0
36
+
```
37
+
38
+
See [WordPress server requirements](https://wordpress.org/about/requirements/) for the latest recommendations.
39
+
:::
40
+
28
41
Note that if the above config options are not enough, all Lando recipes can be further [extended and overriden](https://docs.lando.dev/landofile/recipes.html#extending-and-overriding-recipes).
29
42
30
43
## Choosing a php version
31
44
32
45
You can set `php` to any version that is available in our [php service](https://docs.lando.dev/plugins/php/index.html). However, you should consult the [WordPress requirements](https://wordpress.org/about/requirements/) to make sure that version is actually supported by WordPress itself.
33
46
34
-
The [recipe config](https://docs.lando.dev/landofile/recipes.html#config) to set the WordPress recipe to use `php` version `7.1` is shown below:
47
+
The [recipe config](https://docs.lando.dev/landofile/recipes.html#config) to set the WordPress recipe to use `php` version `8.3` is shown below:
35
48
36
49
```yaml
37
50
recipe: wordpress
38
51
config:
39
-
php: '7.1'
52
+
php: '8.3'
53
+
database: mysql:8.0
40
54
```
41
55
## Choosing a composer version
42
56
@@ -45,6 +59,8 @@ You can set `composer_version` to any version that is available in our [php serv
45
59
```yaml
46
60
recipe: wordpress
47
61
config:
62
+
php: '8.3'
63
+
database: mysql:8.0
48
64
composer_version: '1.10.1'
49
65
```
50
66
@@ -57,6 +73,8 @@ By default, this recipe will be served by the default version of our [apache](ht
57
73
```yaml
58
74
recipe: wordpress
59
75
config:
76
+
php: '8.3'
77
+
database: mysql:8.0
60
78
via: apache
61
79
```
62
80
@@ -65,6 +83,8 @@ config:
65
83
```yaml
66
84
recipe: wordpress
67
85
config:
86
+
php: '8.3'
87
+
database: mysql:8.0
68
88
via: nginx
69
89
```
70
90
@@ -81,30 +101,25 @@ Also note that like the configuration of the `php` version you should consult th
81
101
```yaml
82
102
recipe: wordpress
83
103
config:
84
-
database: mysql
104
+
php: '8.3'
105
+
database: mysql:8.0
85
106
```
86
107
87
108
#### Using MariaDB
88
109
89
110
```yaml
90
111
recipe: wordpress
91
112
config:
92
-
database: mariadb
113
+
php: '8.3'
114
+
database: mariadb:10.6
93
115
```
94
116
95
117
#### Using Postgres
96
118
97
119
```yaml
98
120
recipe: wordpress
99
121
config:
100
-
database: postgres
101
-
```
102
-
103
-
#### Using a custom version
104
-
105
-
```yaml
106
-
recipe: wordpress
107
-
config:
122
+
php: '8.3'
108
123
database: postgres:14
109
124
```
110
125
@@ -215,6 +230,8 @@ Note that you can put your configuration files anywhere inside your application
0 commit comments