ee site create

ee site create -–type=html

创建标准的HTML站点

选项

<site-name>
: 网站名称

[–ssl]
: 在网站上启用SSL

选项:

  • le
  • self
  • inherit
  • custom

[–ssl-key=<ssl-key-path>]
: SSL Key 文件的路径。

[–ssl-crt=<ssl-crt-path>]
: SSL Crt文件的路径。

[–wildcard]
: 获取通配符SSL证书。

[–type=<type>]
: 要创建的站点的类型。值:html,php,wp等。

[–skip-status-check]
: 跳过站点状态检查。

[–public-dir]
: 在htdocs中为网站设置自定义源目录。

范例

# 创建HTML站点
$ ee site create example.com

# 创建使用Letsencrypt SSL证书的站点
$ ee site create example.com --ssl=le

# 创建使用通配符SSL证书的站点
$ ee site create example.com --ssl=le --wildcard

# 创建自签证书的站点
$ ee site create example.com --ssl=self



# 使用 htdocs(SITE_ROOT/app/htdocs/src)中的自定义源目录创建html站点
$ ee site create example.com --public-dir=src

ee site create –type=php

创建标准的PHP站点

选项

<site-name>
: 网站名称

[–cache]
: 对PHP使用redis缓存

[–admin-email=<admin-email>]
: 管理员的E-mail地址

[–with-db]
: 为php网站创建数据库

[–local-db]
: 创建单独的数据库容器,而不使用全局数据库。

[–php=<php-version>]
: 网站的PHP版本。当前仅支持PHP 5.6和最新版本。

默认: latest
选项

  • 5.6
  • 7.0
  • 7.2
  • 7.3
  • latest

[–dbname=<dbname>]
: 设置数据库名称

[–dbuser=<dbuser>]
: 设置数据库用户名

[–dbpass=<dbpass>]
: 设置数据库密码

[–dbhost=<dbhost>]
: 设置数据库主机。 仅在需要远程dbhost时才传递值。

[–with-local-redis]
: 使用本地redis容器启用缓存。

[–skip-check]
: 如果设置,则不检查数据库连接。

[–skip-status-check]
: 跳过站点状态检查。

[–ssl]
: 在网站上启用SSL。

选项:

  • le
  • self
  • inherit
  • custom

[–ssl-key=<ssl-key-path>]
: SSL密钥文件的路径。

[–ssl-crt=<ssl-crt-path>]
: SSL Crt文件的路径。

[–wildcard]
: 创建 通配符SSL。

[–force]
: 如果远程数据库不为空,则重置它。

[–public-dir]
: 在htdocs中为网站设置自定义源目录。

范例

# 创建没有数据库的PHP站点
$ ee site create example.com --type=php

# 创建带数据库的PHP站点
$ ee site create example.com --type=php --with-db

# 创建使用letsencrypt证书的PHP站点
$ ee site create example.com --type=php --ssl=le

# 创建使用通配符SSL证书的站点
$ ee site create example.com --type=php --ssl=le --wildcard



# 创建自签名证书的PHP站点
$ ee site create example.com --type=php --ssl=self

# 创建使用远程数据库的PHP站点
$ ee site create example.com --type=php --with-db --dbhost=localhost --dbuser=username --dbpass=password

# 使用 htdocs(SITE_ROOT/app/htdocs/public)中的自定义源目录创建php站点
$ ee site create example.com --type=php --public-dir=public

# 创建自定义SSL证书的PHP站点
$ ee site create example.com --ssl=custom  --ssl-key='/path/to/example.com.key' --ssl-crt='/path/to/example.com.crt'

ee site create –type=wp

创建标准的WordPress网站。

选项

<site-name>
: 网站名称

[–cache]
: 对WordPress使用Redis缓存。

[–vip]
: Create WordPress VIP GO site using your vip repo which contains wp-content dir. Default it will use skeleton repo.

默认: https://github.com/Automattic/vip-go-skeleton.git

[–mu=<subdir>]
: 开启 WordPress 子目录多站点。

[–mu=<subdom>]
: 开启 WordPress 子域多站点。

[–title=<title>]
: 你的站点标题。

[–admin-user=<admin-user>]
: 站点管理员的用户名。

[–admin-pass=<admin-pass>]
: 管理员的密码。

[–admin-email=<admin-email>]
: 管理员的E-mail。

[–local-db]
: 创建单独的数据库容器,而不使用全局数据库。

[–with-local-redis]
: 使用本地redis容器启用缓存。

[–public-dir]
: 在htdocs中为网站设置自定义源目录。

[–php=<php-version>]
: 网站的PHP版本。当前仅支持PHP 5.6和最新版本。

默认:latest
选项:

  • 5.6
  • 7.0
  • 7.2
  • 7.3
  • latest

[–dbname=<dbname>]
: 设置数据库名称。

[–dbuser=<dbuser>]
: 设置数据库用户名。

[–dbpass=<dbpass>]
: 设置数据库密码。

[–dbhost=<dbhost>]
: 设置数据库主机。仅在需要远程dbhost时才传递值。

[–dbprefix=<dbprefix>]
: 设置数据表的前缀。

[–dbcharset=<dbcharset>]
: 设置数据库字符集。

默认: utf8mb4

[–dbcollate=<dbcollate>]
: 设置数据库排序规则。

[–skip-check]
: 如果设置,则不检查数据库连接。

[–version=<version>]
: 选择您要下载的WordPress版本。接受版本号,“latest ”或“ nightly ” 。

[–skip-content]
: 无需默认主题和插件即可下载WP

[–skip-install]
: 跳过wp-core安装。

[–skip-status-check]
: 跳过站点状态检查。

[–ssl]
: 开启站点SSL证书。

选项:

  • le
  • self
  • inherit
  • custom

[–ssl-key=<ssl-key-path>]
: SSL密钥文件的路径。

[–ssl-crt=<ssl-crt-path>]
: SSL crt文件的路径。

[–wildcard]
: 使用 通配符SSL。

[–yes]
: 不提示您进行确认。

[–force]
: 如果远程数据库不为空,则重置它。

范例

# 创建Wordpress站点
$ ee site create example.com --type=wp

# 创建WordPress子目录多站点
$ ee site create example.com --type=wp --mu=subdir



# 创建WordPress子域名多站点
$ ee site create example.com --type=wp --mu=subdom

# 创建使用letsencrypt证书的Wordpress站点
$ ee site create example.com --type=wp --ssl=le

# 创建letsencrypt通配符证书的Wordpress站点
$ ee site create example.com --type=wp --ssl=le --wildcard

# 创建自签名证书的Wordpress站点
$ ee site create example.com --type=wp --ssl=self

# 使用远程数据库创建WordPress网站
$ ee site create example.com --type=wp --dbhost=localhost --dbuser=username --dbpass=password



# 使用自定义网站标题,区域设置,管理员用户,管理员电子邮件和管理员密码创建WordPress网站
$ ee site create example.com --type=wp --title=easyengine  --locale=nl_NL [email protected] --admin-user=easyengine --admin-pass=easyengine

# 使用 htdocs(SITE_ROOT/app/htdocs/current)中的自定义源目录创建WordPress网站
$ ee site create example.com --type=wp --public-dir=current

# 使用自定义SSL证书创建WordPress网站
$ ee site create example.com --ssl=custom  --ssl-key='/path/to/example.com.key' --ssl-crt='/path/to/example.com.crt'

子命令

NameDescription
ee site clean 清除网站的对象和页面缓存。
ee site delete 删除网站。
ee site disable 禁用网站。如果它们正在运行,它将停止并删除网站的Docker容器。
ee site enable 启用网站。如果站点的docker容器已停止,它将启动它们。
ee site info 显示所有相关的站点信息,凭据和有用的链接。
ee site list 列出创建的网站。
ee site publish 使用ngrok在线发布网站。
ee site reload 重新加载容器中的服务,而无需重新启动与站点关联的容器。
ee site restart 重新启动与站点关联的容器。
ee site share 使用ngrok在线共享网站。
ee site ssl 验证ssl挑战并更新证书(如果已过期)。
ee site ssl-renew 更新letencrypt SSL证书。
ee site update 支持更新和升级站点。

全局参数

参数描述
–sites_path=<path> 所有站点将被存储的绝对路径。
–locale=<locale> WordPress语言环境。
–le-mail=<le-mail> 用于letsencrypt的Mail-id。
–[no-]color 是否为输出着色。
–debug[=<group>] 显示所有PHP错误;向EE引导程序添加详细信息。
–quiet 禁止显示信息性消息。