Wordpress 本地开发环境镜像

Wordpress local dev environment image

我想为wordpress本地环境设置一个图像。 我们有使用 Mac、Windows 和 Linux 的开发人员,我希望可以轻松设置工作环境。

重要的是,他们可以在 VM 外部使用 IDE 进行开发,并且 GIT。

实现该目标的最佳方法是什么? Docker 还是 Vagrant?

我尝试根据本教程这样做,但有些地方不对,无法正常工作。 https://resources.distilnetworks.com/all-blog-posts/wordpress-development-with-vagrant

我用过 Varying Vagrant Vagrants, which is great for WordPress development for a pretty long time, recently I've switched to Laravel's Homestead,它也很棒,也适用于 WordPress。

两者都是预制环境,易于安装、预配置和随时可用。他们从来没有遇到过任何问题。

您可以为此目的使用 WPTunnel。

它在 Docker 容器内创建本地 WordPress 安装。源文件是从本地目录安装的,因此任何 IDE 和 Git 都可以访问它:

https://github.com/dsdenes/wptunnel

例如如果您使用以下命令创建本地安装:

$ wptunnel create mysite

然后您可以在 ~/wptunnel/projects/mysite 访问源文件 所以如果你想使用像Git这样的版本控制工具,那么你可以这样做:

$ git init ~/wptunnel/projects/mysite

并使用您喜欢的文件编辑文件 IDE:

$ code ~/wptunnel/projects/mysite

免责声明:我是图书馆的作者