title: "给定自定义 wp-content 目录" post_status: publish comment_status: open taxonomy: category: - wp-cli-handbook post_tag: - Behat Steps - Repos - Data
给定自定义 wp-content 目录
配置自定义 wp-content 目录。
使用方法
定义 WP_CONTENT_DIR、WP_PLUGIN_DIR 和 WPMU_PLUGIN_DIR 常量。
Scenario: 我的示例场景
Given a WP install
And a custom wp-content directory
Behat 步骤文档随每次 WP-CLI 代码库发布自动生成。如需改进建议,请提交拉取请求。
相关
- Given an empty directory - 创建一个空目录。
- Given /^an? (empty|non-existent) ([^\s]+) directory$/ - 创建或删除一个特定目录。
- Given an empty cache - 清空 WP-CLI 缓存目录。
- Given /^an? ([^\s]+) (file|cache file):$/ - 创建具有给定内容的文件。
- Given /^"([^"]+)" replaced with "([^"]+)" in the ([^\s]+) file$/ - 使用正则表达式在文件中搜索并替换字符串。
- Given /^that HTTP requests to (.*?) will respond with:$/ - 模拟对给定 URL 的 HTTP 请求。
- Given WP files - 下载 WordPress 文件但不安装。
- Given wp-config.php - 使用 `wp config create` 创建 wp-config.php 文件。
- Given a database - 创建一个空数据库。
- Given /^a WP( \d[^\s]+)? install(?:ation)?$/ - 安装 WordPress。
- Given /^a WP( [^\s]+)? install(?:ation)? in ['"]?([^'"]+)['"]?$/ - 在给定目录中安装 WordPress。
- Given a WP install(ation) with Composer - 使用 Composer 安装 WordPress。
- Given a WP install(ation) with Composer and a custom vendor directory :vendor_directory - 使用 Composer 和自定义供应商目录安装 WordPress。
- Given /^a WP multisite (subdirectory|subdomain)?\s?(install|installation)$/ - 安装 WordPress 多站点。
- Given these installed and active plugins: - 安装并激活一个或多个插件。
- Given download: - 下载多个文件到指定目标位置。
- Given /^save (STDOUT|STDERR) ([\'].+[^\'])?\s?as \{(\w+)\}$/ - 将 STDOUT 或 STDERR 的内容存储到变量中。
- Given /^a new Phar with (?:the same version|version "([^"]+)")$/ - 使用指定版本构建一个新的 WP-CLI Phar 文件。
- Given /^a downloaded Phar with (?:the same version|version "([^"]+)")$/ - 从 GitHub 下载指定版本的 WP-CLI Phar 文件。
- Given /^save the (.+) file ([\'].+[^\'])?as \{(\w+)\}$/ - 将指定文件的内容存储到变量中。
- Given a misconfigured WP_CONTENT_DIR constant directory - 修改 wp-config.php 文件,将 `WP_CONTENT_DIR` 设置为空字符串。
- Given a dependency on current wp-cli - 将 `wp-cli/wp-cli` 添加为 Composer 依赖项。
- Given a PHP built-in web server - 在当前目录启动 PHP 内置 Web 服务器。
- Given a PHP built-in web server to serve :subdir - 在指定子目录中启动 PHP 内置 Web 服务器。