问题标签 [vvv-wordpress]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
789 浏览

nginx - Vagrant 'vv create' 不起作用

变量 VVV 有问题....我已安装并运行变量 VVV。当我运行“vv create”时,它会创建目录和数据库(并报告成功),但不会将 Wordpress 文件夹和文件传输到目录中。当我尝试访问该目录时,出现“404 Not Found nginx”错误。目录中唯一存在的文件是“vvv-hosts”、“vvv-init.sh”、“wp-cli.yml”。我在 Windows 10 上以管理员身份运行 Git Bash。谁能指出我正确的方向?

0 投票
1 回答
233 浏览

php - 在 VVV 中创建的新网站不显示

使用 , 创建的新网站vv create不会出现在主机中,创建后我找不到它们。

我在 vvv 中创建了很多网站,但是 vagrant-hostsupdater 只能从 vvv 中找到默认站点。而且,我在更新到 vvv 2.0 后遇到了这个问题。

任何人都知道如何解决这个问题?我怎样才能让我的网站 - aluxh.dev 在 nginx 中找到?

此外,当我进行配置时,它也停止提示我输入密码。我不明白为什么。

0 投票
1 回答
763 浏览

wordpress - VVV,自定义站点 URL 重定向到仪表板

我刚刚使用 Vagrant 和 Virtual Box 安装并设置了 VVV,基础级别的一切都运行良好。

根据他们的示例,我尝试添加自定义站点,但是当我导航到自定义站点的 URL(vvvtest.dev) 时,我会被发送到 VVV 仪表板,而不是新站点的 WP 安装过程。

我正在使用 vagrant-hostsupdater 以便为我和 vagrant-triggers 填充主机文件。

任何帮助将不胜感激!

编辑:我在我的主机文件中注意到 vvvtest.dev 指向与 vvv 和 vvv.dev 相同的位置(sim 链接?),请参见屏幕截图。我在配置期间哪里出错了?

我的 vvv-custom.yml 文件存储在主文件夹(vagrant-local)中:

我的 nginx.conf 文件存储在 www/vvvtest/provision 中:

我的 vvv-init.sh 文件,存储在 www/vvvtest/provision

主机文件: Windows 主机文件

0 投票
1 回答
1140 浏览

pear - Pear 和 PHP_CodeSniffer 安装问题:无法从命令行使用 phpcs

我的设置:Mac OSX El Capitan 10.11.6,PHP 7.0.24-1+ubuntu14.04.1,PEAR 版本:1.10.5,我正在使用 vagrant/virtualbox (vvv) 进行本地 wordpress 构建。

我是 pear 和 php_codesniffer 的新手,似乎无法让 phpcs 命令正常工作。我一直在尝试使用 pear 安装 PHP_CodeSniffer:

我的第一个问题是尝试安装 PEAR 时。我按照说明进行操作: $ curl -O https://pear.php.net/go-pear.phar& $ php -d detect_unicode=0 go-pear.phar。然后,当我尝试将安装库配置为 /usr/local/pear 并将二进制目录配置为 /usr/local/bin 时,出现以下错误: Unable to create PHP code directory ($php_dir) /usr/local/pear/share/pear. Run this script as root or pick another location.

我发现其他人有同样的错误并看到了这个解决方案: sudo php /usr/lib/php/install-pear-nozlib.phar -d /usr/local/lib/php -b /usr/local/bin 但这提示了一个错误: Could not open input file: /usr/lib/php/install-pear-nozlib.phar

然后我尝试使用:/home/vagrant/pear 配置 pear。我能够安装 PHP_codesniffer,当我使用时pear list,我可以看到 php_codesniffer:

vagrant@vvv:~$ pear list 已安装包,频道 pear.php.net:包版本状态 Archive_Tar 1.4.3 stable Console_Getopt 1.4.1 stable PHP_CodeSniffer 3.1.1 stable Structures_Graph 1.1.1 stable XML_Util 1.4.2 stable

当我运行 phpcs 时,我收到以下消息:当前未安装程序 'phpcs'。要运行“phpcs”,请让您的管理员安装包“php-codesniffer”

我发现这篇文章:它提示我:sudo pear config-set php_bin /usr/bin/php,然后卸载并重新安装代码嗅探器。一切似乎都正常工作,但是当我尝试 which phpcs 时,什么都没有。

我已经安装和卸载了几次 pear。当我尝试卸载时,它说 pear 没有安装,但是当我这样做时which pear,我得到了usr/bin/pear. 这有点混乱,任何建议将不胜感激。

0 投票
2 回答
298 浏览

bash - Bash:无法解决意外的令牌语法错误

目标:我正在尝试设置VVV,我不打算在默认情况下在特定数据库上运行数据库备份。

我被困在哪里:syntax error near unexpected token `done'即使我在 bash 脚本中使用换行符,我也会一直得到。

采取的步骤:我还确保我在两个 bash 脚本中都有 LF 行结尾,但我得到了同样的错误。

文件:vagrant_halt_custom

文件:db_backup_custom

错误

0 投票
2 回答
114 浏览

bash - Varying Vagrant Vagrants 提供脚本问题

我正在尝试为Browscap编写一个配置脚本,我快到了,我只是想看看我在尝试重写php.ini文件时做错了什么。

回购在这里

配置脚本如下所示

当规定结束时,我检查我的php.ini我得到

所以我在我的sed命令中遗漏了一些东西。

但是什么?

MVE

如果您安装了 VVV,您可以使用 shhvagrant ssh

然后去/home/vagrant创建text.txttest.sh

text.txt

test.sh

这将导致text.txt

0 投票
0 回答
376 浏览

vvv-wordpress - Vagrant up 自动销毁 VM 和相关驱动程序

我想为 WordPress 做贡献,所以我需要安装 wordpress 元环境。我正在使用此链接安装 VVV 。我已经安装了 Oracle VM VirtualBox。

起初安装一切顺利,我可以使用 local.wordpress.test 站点。我做了一些调整并弄乱了这个网址。无法解决这个问题,我决定重申 VVV 的整个安装。我运行了“vagrant up”命令,这次一切正常,直到最后我收到这条消息

一切都是最初创建的,我也可以在 VM VirtualBox 中看到一个条目。但最后这出现在我的终端上,到目前为止所做的每一个进展都被删除了。我整天都坚持这一天。我尝试了很多可能性,但找不到解决方案。最后我决定在这里问。

我只想顺利完成我的流浪安装。请帮助我防止“vagrant up”自动销毁创建的 VM 用户。我将非常感激并愿意接受任何建议。谢谢!!

0 投票
1 回答
197 浏览

wordpress - 如何为 VVV 实例化的 VM 编辑 nginx.conf?

我正在尝试使用 VVV 为现有的 WordPress 站点设置本地开发环境(如果有任何区别,则托管在 WP Engine 上),但无法将nginx.conf指向正确的 webroot 更改。

按照官方文档,我使用基本自定义站点模板配置了一个新站点,然后将其交换为我们的 WordPress 安装和数据库。

这将创建一个带有 public_html webroot 的站点。由于我们的站点在 Apache 上,因此我们有一个 htdocs 文件夹。因此,根据这些说明,我已编辑provision/vvv-nginx.conf以更改根目录并重新配置。

在重新配置时,nginx.conf 会被自定义站点模板中的原始格式覆盖。

为什么会发生这种情况,我该如何解决?

我也尝试过 sshing 进入 vagrant 框并按照这些说明手动编辑配置,但这似乎也不起作用。

0 投票
1 回答
137 浏览

vagrant - Varying Vagrant Vagrants - How to copy site files from private bitbucket repository

I am trying to use my own custom site template provisioner which uses a private bitbucket repository. I am using a Windows 10 host machine. My config.yml file has this:

#xA;

But I get this error:

#xA;

I have SSH keys on both the host machine and the VM which should let it connect to bitbucket without a password.

I also added a config file which contains:

#xA;

But it still gives the same error. Changing the https address to an SSH address:

#xA;

changes the error message to:

default: git@bitbucket.org: Permission denied (publickey).

Setting up SSH key forwarding by adding the ~/.ssh/id_rsa key to ssh-agent does not work either.

Another thing I tried is:

What worked is:

  1. Install Putty
  2. Creating a new key pair with Putty
  3. Upload Putty public key to Bitbucket
  4. Add Putty private key to Pageant

Weirdly enough this worked the first time I tried it, but now every time I try to use these putty keys for anything it tells me the ppk key is invalid format.

EDIT: Eventually I figured out that I can import my ordinary OpenSSH key (id_rsa) into PuTTy and generate a .ppk key from that, then I can use plink like this:

#xA;

But now the problem I have is I need to make plink.exe the default SSH executable (what runs when git bash runs the ssh command), I read that you can do this by setting the GIT_SSH environment variable to point to plink. I tried this but it doesn't work.

Why am I wasting a huge amount of time on this bs? Oh yeah, it's because I got a new laptop which came with Windows 10 installed on it and I thought "ah, since it's already installed on there I might as well use it, I can always run Linux and launch my development environments with vagrant). I should have known better. This is like a recurring nightmare and the only way to wake up is to install Linux. It's like an episode of Black Mirror where Windows has taken over the world and installed this horrific operating system on every single new laptop that comes out of a factory and brainwashed the masses into believing it is actually in their best interest to use this operating system which imprisons them technologically, economically and even mentally. They never asked me if I wanted Windows on my new laptop.I was not asked for my consent, they just went ahead and did it. I feel like I've been violated. And it's not the first time. I once got a new laptop and it had a weird UEFI booting mechanism that actually prevented you from installing another operating system. I was stuck with Windows for a long time. This is like being stuck in a prison cell with a cell mate who...

0 投票
1 回答
42 浏览

bash - Variant Vagrant Vagrant (VVV) 脚本中的“noroot”是什么意思

我正在尝试为 VVV 编写自定义配置器。我注意到 shell 脚本中的许多命令行都以“noroot”为前缀。

这里有一些例子:

我不知道'noroot'的目的是什么。

谁能解释一下什么是“noroot”以及在哪里可以找到有关它的文档。

谢谢你。