简体   繁体   English

哪里可以保存openshift wordpress安装的插件

[英]Where to save plugins for openshift wordpress install

I would like to upload a custom installation of openshift. 我想上传openshift的自定义安装。 I have installed wordpress and cloned it via git. 我已经安装了wordpress并通过git克隆了它。 Now I would like to add manually some plugins and push it back to openshift. 现在我想手动添加一些插件并将其推回到openshift。 Where do I have to put in my extracted plugins/themes? 我必须在哪里放入我提取的插件/主题?

I appreciate your answers! 我感谢你的回答!

Short answer: store your plugins and themes in .openshift. 简短回答:将您的插件和主题存储在.openshift中。

Longer answer: Every Openshift account has what can be thought of as a username - a long number like this: 53f1a90f500446c42053423083 更长的答案:每个Openshift帐户都有一个可以被认为是用户名 - 这样的长数:53f1a90f500446c42053423083

Each directory structure features this number so yours: 每个目录结构都有这个号码,所以你的:

/var/lib/openshift/53f1a90f500446c42053423083/app-root/runtime/repo/.openshift /var/lib/openshift/53f1a90f500446c42053423083/app-root/runtime/repo/.openshift

will be different to mine: 将与我的不同:

/var/lib/openshift/12345678901234567890123456/app-root/runtime/repo/.openshift /var/lib/openshift/12345678901234567890123456/app-root/runtime/repo/.openshift

The number gets incorporated into environment variables so that scripts will work on yours and mine equally. 这个数字被合并到环境变量中,这样脚本就可以在你的平台上运行并且同样可以运行。 One of these is OPENSHIFT_REPO_DIR. 其中一个是OPENSHIFT_REPO_DIR。 On your install it will point to: 在您的安装上,它将指向:

/var/lib/openshift/53f1a90f500446c42053423083/app-root/runtime/repo 的/ var / lib中/ openshift / 53f1a90f500446c42053423083 / APP-根/运行/回购

on mine: 我的:

/var/lib/openshift/12345678901234567890123456/app-root/runtime/repo 的/ var / lib中/ openshift / 12345678901234567890123456 / APP-根/运行/回购

Another is OPENSHIFT_DATA_DIR. 另一个是OPENSHIFT_DATA_DIR。

When you push changes from your local directory via git, the deploy script is run and it assembles all the wp files it needs into a directory it names: 当您通过git从本地目录推送更改时,将运行部署脚本,并将所需的所有wp文件组装到其命名的目录中:

OPENSHIFT_DATA_DIR/current OPENSHIFT_DATA_DIR /电流

Openshift moves the 'original' wp plugins and themes folders that are created during a wp install into the OPENSHIFT_DATA_DIR/current/wp-content. Openshift将在wp安装期间创建的“原始”wp插件和主题文件夹移动到OPENSHIFT_DATA_DIR / current / wp-content中。 It looks in OPENSHIFT_REPO_DIR/.openshift for your code and copies in any plugins and themes folders it finds there. 它在OPENSHIFT_REPO_DIR / .openshift中查找代码,并在其找到的任何插件和主题文件夹中复制。

Net effect is to assemble the plugins and themes directories by adding yours to those that came with wp. 净效果是通过将您的插件和主题目录添加到wp附带的那些目录来组装插件和主题目录。 So, your fully-assembled OPENSHIFT_DATA_DIR/current will have these in it: 因此,您完全组装的OPENSHIFT_DATA_DIR / current将包含以下内容:

OPENSHIFT_DATA_DIR/current/wp-content OPENSHIFT_DATA_DIR /电流/可湿性粉剂内容

                                 /themes
                                 /plugins
                                 /uploads

So, anything you put in .openshift will be copied to the right place, but not altered. 因此,您放入.openshift的任何内容都将被复制到正确的位置,但不会被更改。 https://github.com/openshift/wordpress-example https://github.com/openshift/wordpress-example

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM