bernardhanna/matrixstack
Composer 安装命令:
composer create-project bernardhanna/matrixstack
包简介
A modern WordPress stack
README 文档
README
Matrixstack helps you get your projects started locally with modern Wordpress development tools and project structure. It will save time by automating tasks with a DRY development principle.
After setting up, you can create a new Wordpress project based on a modified version of bedrock just by running:
createproject
PLEASE NOTE*
The script is focused on my own workflow, it assumes a lot of things about how you will work. It may need to be tweaked to make it work for you. For example it assumes you use Linux Ubuntu 20.04, always start your projects in ~/Projects, use XXXX.test as your host name url, store your SSL certs in /var/www/certs, use an Apache server with your projects and your current projects home directory will be located in /var/www/....
Features
- Automatic MySQL-database generation
- Automatic Creation of Apache server
- Automatic host conf files creation
- Automatic update of hosts file
- Automatic set up and installation of SSL cert
- Sets up WP user, admin email and pass.
- Installs Wordpress
- Installs Wordpress development plugins
- Installs plugins we typically use in Matrix such as Yoast
- Automatic Github repo initialization
- Capistrano 3 deployment templates bundled in bin/createproject.sh
- Allows you to use Composer to manage WordPress installation
- Install WP packages from WordPress Packagist
- sets up dotenv-environments for development, staging and production
- Adds Premium plugin licences
- Sets up (modified version of)Bedrock
- Changes WP login to /wp/wp-admin for better security
- Deletes default posts and pages
- updates description
- updates language to en_GB
- deletes default themes and plugins
- sets the timezone to Dublin
- removes pingbacks
- Activates plugins
- Customizable to suit your workflow eg, change the plugins pre installed etc
Requirements
- Linux Ubuntu OS
- mkcert
- Composer v2
- Basic knowledge about bash scripting
- Basic knowledge npm packages, bundle, composer etc.
- Optional: Access to staging and production servers that supports sftp and git
- Projects located under home/Projects
- Git
- PHP >= 7.2
- Ruby >= 2.6
- Perl
- WP-CLI
- Apache
- mySQL
Installation
- Clone this repo to your Projects directory: /home/YourUserName/Projects
git clone https://github.com/bernardhanna/matrixstack.git
- Change directory to matrixstack and then bin folder
cd /Projects/matrixstack/bin
- Run the setup script for the first and only time
bash matrix.sh
-
Follow any onscreen instructions to link this file to system level.
-
Create your new project. (You can skip to this step going forward)
createproject
From here the on screen prompts will guide you
- Note when the project loads you will get a whitescreen as there is no Theme installed. You will know if everything worked by accessing the admin
Preinstallation
WP-Cli is included in matrixstack per project via composer.json but won't work by default globally. You'll need this alias on your Linux .bashrc or .bash_profile file:
alias wp='./vendor/wp-cli/wp-cli/bin/wp'
The createproject script assumes:
- You use Linux Ubuntu as OS
- You use .test as your domain extension (it will automatically add this extension to whatever name you give your project)
- You will be using Apache
- Your SSL certs will be stored in /var/www/certs
- Your project folder will be located: var/www/PROJECT-NAME
What matrix.sh does
- Runs composer create-project with matrixstack settings
- Installs our default WordPress plugins and updates them
- Sets up MySQL database
- Installs capistrano deployment tool
- Generates default capistrano configs (config/deploy.rb, config/deploy/staging.rb, config/deploy/production.rb) with your GitHub project details and paths
- Sets up WordPress configs (wp-config credentials to .env) and salts automatically
- Installs WordPress under its own subdirectory /wp (thus, admin located in example.test/wp/wp-admin)
- Sets up default admin user as not "admin" for security
- Removes default WordPress posts, themes and plugins and everything else not so useful
- Activates default plugins, timezones, permalinks
- Flushes rewrites, adds support for permalinks and webfonts
- Sets up file permissions
- Inits a GitHub repository
- Creates a HTTPS certificate
- Sets up a virtual host for development environment
- Updates /etc/hosts file.
- Restarts development server
Next Steps (get involved)
- Fix issue with ACF pro breaking the script when trying to auto install
- Create a goLive script which checks everything in our QA sheet, installs and configures plugins like All in one security, Wordfence, WP rocket etc before deploying.
- Create Mac/Windows version
- Create a starter theme & script and incorporate
- Create a Wiki outlining whats different with the modified version of bedrock included and why its different
bernardhanna/matrixstack 适用场景与选型建议
bernardhanna/matrixstack 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 32 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 10 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「composer」 「wordpress」 「vagrant」 「stack」 「wp」 「roots」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bernardhanna/matrixstack 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bernardhanna/matrixstack 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bernardhanna/matrixstack 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Vagrant(centos7) for web developers.
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
Simple ASCII output of array data
Fixed the Sublime editor link path when running a project from a VM
Generate a Composer repository from installed WordPress plugins and themes.
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 33
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-03

