如何更改 Lando 8.1.2 中的 php 版本
P粉714844743
P粉714844743 2023-11-02 22:35:17
0
1
592

这是我的第一个问题。我是初学者。我正在与 Sage 一起从事 WordPress 项目。当我尝试运行模板时,出现错误:

composer版本还可以,但是Lando版本是php7.4,我需要php8.1版本。

我尝试更改lando.yml中的php版本,然后使用命令lando重建,但它不起作用。我也在和 manjaro 一起工作。欢迎任何帮助。谢谢!

P粉714844743
P粉714844743

全部回复 (1)
P粉145543872

您可以从lando init开始

$ lando init ? From where should we get your app's codebase? remote git repo or archive ? Please enter the URL of the git repo or tar archive containing your application code https://wordpress.org/latest.tar.gz ? What recipe do you want to use? wordpress ? Where is your webroot relative to the init destination? wordpress ? What do you want to call this app? my-wordpress-app

然后你会得到一个.lando.yml,你需要在其中指定appserver的php版本。

# .lando.yml name: my-wordpress-app recipe: wordpress config: webroot: wordpress services: appserver: type: php:8.1 #add these lines

您可能还需要在进行 php 更改后销毁并重建:

lando destroy -y && lando start

来源:

    最新下载
    更多>
    网站特效
    网站源码
    网站素材
    前端模板
    关于我们 免责声明 Sitemap
    PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!