seravo / wordpress
Seravo WordPress项目模板
Requires
- php: >=8.0
- composer/installers: ^1.0
- johnpbloch/wordpress-core: ^6.0
- johnpbloch/wordpress-core-installer: ^2.0
- koodimonni-language/fi: *
- koodimonni-language/sv_se: *
- koodimonni/composer-dropin-installer: ^1.0
- roots/bedrock-autoloader: ^1.0
- seravo/seravo-plugin: *
- vlucas/phpdotenv: ^5.0
- wpackagist-plugin/google-site-kit: *
- wpackagist-plugin/two-factor: *
- wpackagist-theme/twentytwentythree: *
- dev-master
- v2.1.0
- v2.0.1
- v2.0.0
- 1.3
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0
- 0.8.3
- dev-feature/devmode
- dev-feature/phpcs
- dev-feature/bcrypt
- dev-feature/captcha
- dev-bugfix/pr208
- dev-feature/pr-action
- dev-feature/debug-always
- dev-travis-test
- dev-feature/new-wp-vagrant
- dev-fix-private-key
- dev-replace-vagrant-steps
- dev-feature/docker-ci
- dev-dev-otto
- dev-feature/max-cpu-2
- dev-feature/gnitpick
- dev-feature/virtualbox-version-check
- dev-fix/uartmode1
- dev-feature/traefik
- dev-feature/git-hooks
- dev-beta
- dev-bugfix/composer-2.0
- dev-feature/update-dev-deps
- dev-test/gnitpick-test
- dev-feature/shellcheck
- dev-feature/vagrant-core-triggers
- dev-feature/slimdown-vagrantfile
- dev-feature/renewed-test-triggers
- dev-feature/update-upstream-files
- dev-dev-samuli
- dev-feature/docker
- dev-fix-osx-add-trusted-cert
- dev-fix-travis-gulp-error
- dev-feature-no-languagepacks
- dev-feature-custom-db-error-page
- dev-fix-db-port
- dev-allow-js-errors
This package is not auto-updated.
Last update: 2024-09-14 16:13:42 UTC
README
Seravo WordPress项目模板
由Seravo.com提供。
一个用于Git、Composer和Nginx的WordPress项目布局。它还包括用于本地开发的Vagrant box和Docker镜像的配置。
默认情况下,所有Seravo.com实例都使用此项目布局,以便轻松部署工作流程。此存储库的内容等于服务器上/data/wordpress/
目录中的内容。
文档
请参阅我们的文档https://seravo.com/docs/,了解有关与此项目模板一起使用的git工作流程的一般信息。
安装
请参阅我们的文档https://seravo.com/docs/development/how-to-install/,了解如何安装Vagrant及其依赖项。
特性
- 包括Nginx、MariaDB、PHP7、PHP8、Redis和Git,用于在现代堆栈中运行WordPress。
- Git钩子来测试您的代码,以确保只有高质量的代码被提交到git
- 使用Codeception和headless Chrome的高级WordPress验收测试
- PHP Codesniffer代码风格和质量分析器
- 包括自签名证书(并在OS X中自动信任它们)以测试https://本地
- Xdebug和Webgrind用于调试和性能分析您的应用程序
- Mailcatcher作为SMTP服务器来调试邮件
- Adminer用于管理您的数据库的图形界面
- BrowserSync作为WordPress的自动测试中间件
Vagrant凭据
WordPress
user: vagrant
password: vagrant
MariaDB (MySQL)
user: root
password: root
开发
此存储库的布局设计为允许在版本控制中存储网站而不会暴露任何机密数据。默认情况下,git会忽略所有敏感数据。
所有插件都由Composer处理,因此git会忽略它们。如果您创建了自定义插件,请强制将其添加到git中以便跟踪,或将新行添加到.gitignore
中以便不忽略。
.gitignore
中不忽略的示例行
!htdocs/wp-content/plugins/your-plugin/
如果您创建了自定义主题,它们将自动在git中跟踪。
开发自定义插件和主题的最佳方法是将其添加到它们自己的存储库中,并通过composer安装。您可以通过添加插件/主题的composer.json
并像下面这样在项目中要求它们来实现
"repositories": [ { "type": "vcs", "url": "https://github.com/your-name/custom-plugin.git" } ], "require": { "your-name/custom-plugin": "*" }
更新
Vagrant会在Vagrant box的新版本可用时立即通知您。但是,网站环境不会自动更新到较新版本。
要下载并更新您的Vagrant box以使用最新镜像,请运行
vagrant box update
vagrant destroy
vagrant up
配置
config.yml
将config.yml中的name
更改为更改您的站点名称。这将在开发环境中的一些地方使用。
添加production => domain
和production => ssh_port
以与您的生产实例同步。
在首次运行vagrant up之前,在development => domains
下添加新域名以拥有额外的域名。
有关更多信息,请参阅config-sample.yml
。
布局
该仓库的根目录等同于Seravo.com实例中/data/wordpress
目录的内容。
├── config.yml # Project name, domains and other configuration
├── composer.json # Composer definition, used to pull in WordPress and plugins
├── composer.lock # Composer lock file. This is safe to delete and ignore as detailed dependency control is not relevant in WordPress.
├── gulpfile.js # Gulp example with correct paths
├── Vagrantfile # Vagrantfile for Seravo/WordPress Vagrant box
│
├── nginx # Custom modifications to Nginx which are also used in production
│ └── examples.conf # Some examples to get started
│ └── anything.conf # Your own config files can be named anything *.conf
│
├── scripts
│ ├── hooks # Git hooks for your project
│ │ ├── pre-commit # Run after every git commit
│ │ └── post-receive # Run after every git pull/push
│ │
│ ├── WordPress
│ │ └── Installer.php # Composer helper for WordPress installation
│ │
│ └── run-tests # Bash script as an interface for your tests in Seravo's production and development environments
│
├── vendor # Composer packages go here
└── htdocs # The web root of your site
├── wp-content # Directory moved out of WordPress core for git compatibility
│ ├── mu-plugins
│ ├── plugins
│ ├── themes
│ └── languages
├── wp-config.php
├── wp-load.php
├── index.php
└── wordpress # WordPress core
├── wp-admin
├── index.php
└── ...
致谢
- 目录布局深受roots/bedrock的启发。
- 开发栈深受VVV的启发。
版权所有Seravo Oy,2015–2023及贡献者。本作品在GPLv3许可证下可用。