WordPress.com VIP主题激活问题 - 找不到vip-init.php

时间:2017-05-08 06:05:35

标签: wordpress virtualbox vagrant-provision

我正按照以下说明在Ubuntu 14.04 LTS计算机上设置我的第一个VIP主题:

https://vip.wordpress.com/documentation/vip/dev-environment/http://docs.chassis.io/en/latest/quickstart/#prerequisites

此时我有:
- 安装Virtual Box 5.1 - 安装了Vagrant 1:1.9.4

在详细编写步骤之前,这是我当前的文件夹结构

/var/www/html
          |-> thevp (Chassis installation)
              |-> wp
                 |-> wp-content/themes/vip/plugins
                        |         |           |-> vip-init.php
                        |         |-> vp-theme (custom theme)
                        |-> mu-plugins

Vagrant URL: vagrant.local
Admin URL: vagrant.local/wp/wp-admin

安装上面两个后,我在/var/www/html/thevp文件夹中安装了机箱。这安装了一个名为wp的文件夹,我相信默认的WordPress安装。所以现在我有/var/www/html/thevp/wp(加上其他文件夹和文件) wp-content文件夹位于" wp"夹

接下来,我在/var/www/html/thevp/wp/wp-content/themes/vip/plugins内的svn co https://vip-svn.wordpress.com/plugins/ wp-content / themes / vip / plugins中安装了 VIP插件和帮助

然后我在/var/www/html/thevp/wp/wp-content/mu-plugins

中安装了VIP mu-Plugins

最后,我在/var/www/html/thevp/wp/wp-content/themes/vp-theme

内部从Github克隆了我的VIP主题

在所有安装和克隆之后,我在/var/www/html/thevp/内运行了$ vagrant,它配置了我的机箱,并显示了网址http://vagrant.local/

以上网址运行正常,并打开TwentySeventeen主题的默认网站。 在Admin>下主题我可以看到我自己的主题vp-theme以及WordPress安装的其他默认主题。

但每当我尝试激活此主题时,我收到此错误消息:

  

警告:   require_once(/vagrant/content/themes/vip/plugins/vip-init.php):失败   打开流:没有这样的文件或目录   /vagrant/wp/wp-content/themes/vip/yrc-wordpress-theme/functions.php on   第9行

     

致命错误:require_once():无法打开所需内容   ' /vagrant/content/themes/vip/plugins/vip-init.php'   (include_path ='。:/ usr / share / php')in   /vagrant/wp/wp-content/themes/vip/yrc-wordpress-theme/functions.php on   第9行

假设/var/www/htm/thevp未被识别为正确的路径,因为wp-content文件夹实际位于/var/www/html/thevp/wp下,这应该是root,我销毁了VirtualBox的运行实例并运行$ vagrant up再次,但这次是从/var/www/html/thevp/wp内部。

但我仍然得到同样的错误。无法弄清楚如何解决这个问题。

这是我第一次以VIP为主题。请帮忙!

更新
我检查了我的主题的functions.php以获取以下行

require_once WP_CONTENT_DIR . '/themes/vip/plugins/vip-init.php';

哪里有,但我感觉WP_CONTENT_DIR可能由于某种原因输出了错误的路径,因为错误信息显示

require_once(/vagrant/content/themes/vip/plugins/vip-init.php)...

我找不到任何文件夹/vagrant/content。完全被困在这里因为我不知道下一步该做什么!

0 个答案:

没有答案
相关问题