circul8/wordpress 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

circul8/wordpress

Composer 安装命令:

composer create-project circul8/wordpress

包简介

Custom Circul8 Wordpress stack.

README 文档

README

Packagist

Circul8's WordPress stack based on the Root's Bedrock with some pre-installed plugins.

Installation

1. Init the project

Create a new project in a new folder:

It's important to set the ACF PRO key at the beginning otherwise the installation will fail:

  $ export ACF_PRO_KEY=123abc
  $ composer create-project circul8/wordpress your-project-folder-name

2. Configure the DB

Update environment variables in .env file:

  • DB_NAME - Database name
  • DB_USER - Database user
  • DB_PASSWORD - Database password
  • DB_HOST - Database host
  • WP_ENV - Set to environment (development, staging, production)
  • WP_HOME - Full URL to WordPress home (http://example.com)
  • WP_SITEURL - Full URL to WordPress including subdirectory (http://example.com/wp)
  • AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY, AUTH_SALT, SECURE_AUTH_SALT, LOGGED_IN_SALT, NONCE_SALT

3. Others

  1. Set your site vhost document root to /web folder e.g. /path/to/site/web/

  2. Access WP admin at http://example.com/wp/wp-admin

Plugins

Pre-installed plugins

  1. Classic Editor (activated -> MU* plugin)
    • We don't use the Gutenberg.
  2. Disable Comments (activated -> MU* plugin)
    • All comments must be disabled. We don't use this functionallity. Also, it's a security hole.
  3. Duplicate Post (activated -> MU* plugin)
    • Administration UX tweak to easily copy/paste posts.
  4. Post Types Order (activated -> MU* plugin)
    • Administration UX tweak to easily reorder posts.
  5. Tinymce Advanced (activated -> MU* plugin)
    • WYSIWYG enahancement.
  6. Advanced Custom Fields PRO (activated -> must use)
    • Most important plugin.
  7. Wordfence (not activated)
    • This is not mandatory plugin, but recommended. Security.
  8. WP Mail SMTP (not activated)
    • This is not mandatory plugin, but recommended, wpmail() is not reliable. Company policy is to use Mailgun.

*MU - Must Use Plugin

Installing new plugins

Installing new plugins are usually disabled on production due to security reasons, therefore use composer:

  1. Find the plugin at WPackagist
  2. Install the plugin composer require wpackagist-plugin/akismet

Testing & Coding style

The PHPCS has been removed due to the fact this is just a scaffold for WP Headless projects that should use WP plugins only without any theme.

If additional functionality is needed, follow the Circul8 Coding Standards here.

Local development

In order to develop this project package locally, you need to:

  1. Clone this repo
  2. Do your changes in the clone
  3. Commit changes (do not push)
  4. Create packages.json somewhere (see bellow)
  5. Run the create-project with specified packages.json (see bellow)

create-project

$ composer clearcache && export ACF_PRO_KEY="123==" && composer create-project --repository-url={YOURPATH}/packages.json circul8/wordpress:dev-master

Don't forget to change the {YOURPATH} to your packages.json.

packages.json

{
  "package": {
      "name": "circul8/wordpress",
      "version": "1.0.0",
      "source": {
        "url": "{YOURPATH}wordpress/.git",
        "type": "git",
        "reference": "{YOURBRANCH}"
      }
  }
}

Again, don't forget to change the {YOURPATH}. This time it must lead to the cloned repository of the circul8/wordpress. You also need to change the {YOURBRANCH} to your testing branch.

Reference

Documentation / Reference

Change log

  • v2.0.0 (2020-01-28)
    • Upgraded to latest Bedrock.
    • Removed starter theme -> ongoing projects should be headless.
    • Removed Timber plugin -> ongoing projects should be headless.
    • Upgraded to the Wordpress 5.3
    • All plugins updated.
  • v1.0.0 (2019-03-14)
    • Versioning started. Wordpress upgraded to 5.1.1.
    • Fix of ACF to work with Guttenberg.
    • Upgraded to latest Bedrock.

circul8/wordpress 适用场景与选型建议

circul8/wordpress 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 42 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 06 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「composer」 「wordpress」 「wp」 「roots」 「bedrock」 「wp-config」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 circul8/wordpress 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 circul8/wordpress 我们能提供哪些服务?
定制开发 / 二次开发

基于 circul8/wordpress 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 42
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1177
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-01