定制 loonpwn/wp-keystone 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

loonpwn/wp-keystone

Composer 安装命令:

composer require loonpwn/wp-keystone

包简介

Wordpress Keystone is a WordPress boilerplate designed for quickly building effective twelve-factor applications

README 文档

README

Wordpress Keystone is a WordPress boilerplate designed for quickly building effective twelve-factor applications

Why WordPress Keystone?

  • Development environment ready to go with docker
  • Asset building with Laravel Mix
  • Component / action design at the core
  • Sane assumptions about how you want to use it

WordPress Keystone is the combination of many libraries, taking inspiration and straight code from them. If you are confused on how some of the parts of this project work, checkout the following projects:

Project Structure

app - Project functionality

app/components - This is the bread and butter of the boilerplate. All your code you would usually stick in functions.php lives here. WordPress Keystone wil automatically parse folders within the components folder and have the files contained loaded under their wordpress filter or hook. This forces developers to think about when there code is being executed within the WordPress runtime.

config - All application configuration is found here including constant definition and bootstrapping

env - Environment based files. Mainly docker configuration and tools are found within here.

resources - Most importantly, your view files are found here as well as styles and scripts.

runtime - Any application runtime files live here, besides uploads.

web - This is your web root. Avoid putting anything in here if you can.

Setup

Boilerplate Instructions

Install: composer create-project loonpwn/wp-keystone project-name

First Run a search and replace for the following:

  • Your site url: local.wp-keystone -> local.your-domain
  • Your project title: Wordpress Keystone -> Your Project Name
  • Your project slug: wp-keystone -> your-project-slug

Then delete this section from the readme.

Instructions

Note: this project uses docker for all its local development.

Local Setup

  1. Copy over the env file cp -n .env.example .env

  2. Copy over the htaccess cp -n web/.htaccess.sample web/.htaccess

  3. Build & docker containers docker-compose up -d

    Note: If you are already running apache or mysql on ports 80 / 3306, you can change the ports docker runs on in the .env file, otherwise close your other applications

  4. Setup your hosts file. sudo sh -c 'echo "127.0.0.1 local.wp-keystone" >> /etc/hosts'

  5. Mount yourself to the workspace ./env/mount-workspace.sh

  6. Run the deployment script composer build

  7. Install WordPress wp core install --url=local.wp-keystone --title="WordPress Keystone" --admin_user="wp-keystone" --admin_email="admin@local.wp-keystone"

    Note: This command will output the admin password

  8. Done. You can visit the site at http://local.wp-keystone.

    Note: Admin login is at http://local.wp-keystone/wp/wp-admin and login with wp-keystone. The local environment does not check for a valid password so you can enter in anything.

Development

Docker

This project uses a docker container which will host our site for us and be able to build all of our assets for us. Some useful commands:

  • docker-compose restart - Restart the container
  • ./env/mount-workspace.sh - Attach yourself to the workspace container

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-09-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固