Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amitrahav/wordpress-starter
WordPress boilerplate with modern development tools, local development docker-compose support, env configuration, wp-engine ready for push, and an improved folder structure
https://github.com/amitrahav/wordpress-starter
Last synced: 3 days ago
JSON representation
WordPress boilerplate with modern development tools, local development docker-compose support, env configuration, wp-engine ready for push, and an improved folder structure
- Host: GitHub
- URL: https://github.com/amitrahav/wordpress-starter
- Owner: amitrahav
- Created: 2019-06-11T15:08:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-12T19:43:21.000Z (almost 4 years ago)
- Last Synced: 2024-11-08T22:17:10.215Z (about 2 months ago)
- Language: Shell
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project setup instructions
## Quick start
`curl -L https://api.github.com/repos/amitrahav/wordpress-starter/tarball | tar xzf - --strip 1`## Dependencies
1. Appache proxy on localhost _or_ Docker
2. [Composer](https://getcomposer.org/download/)## Credits
- this template based on [justCpded / WordPress Starter](https://github.com/justcoded/wordpress-starter) for composer support
- this template also use [visiblevc/wordpress-starter](https://github.com/visiblevc/wordpress-starter/tree/master) for docker support.
- .gitignore ready for wp-engine git push without core wp.## Auto install
You can auto install all the basic goodies by running `./autoinstall`.
Its includes:1. New Theme - with scripts and desired plugins.
2. Existing theme - that you can pull form git repo and continue working on it within this framework inside the docker with composer.
3. (Future feature) Plugin - initialize plugin## Existing Project
1. Navigate to project root directory:
```bash
cd /path/to/your/project/folder/
```2. Clone zipped specific repo files:
```bash
$ curl https://codeload.github.com/amitrahav/wordpress-starter/tar.gz/master | tar -xz --strip 1
```3. Install all requirements from composer
- By default, ACF PRO is a must use plugin. in order for it to be installed you should add a key to .env file.
```bash
mv .env.example .env
composer install && composer update
```4. Ignore all ops files by adding
```bash
$ echo '\n/data/\n/data/logs\n!/data/.gitkeep\n!/data/logs/.gitkeep\nenvironments\nscripts\n*.example\n*.lock\nlogs.ini\nrobots.txt\n# HERE GOES YOUR APP EXCEPTION' >> .gitignore
```### Database setup
- save your db sql dump at data folder (this is enough for Docker)
- Local Proxy:
- wp-cli import mysql dump: `$wp db import mysql.sql` [requires local wp-cli install](https://wp-cli.org/)
- with phpmyadmin
## Development
### Switch to latest branch
- master - stable production copy,
- develop - current development copy```bash
git checkout
```### Create new branch for your changes
```bash
git checkout -b _
```### Create your environment
1. 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)
- `ACF_PRO_KEY` - Acf key for installing the full version of acf plugin### Setup VScode tasks
If you want you can use the .vscode/tasks.json file for auto processes using vscode tasks.
you need to install globally node-sass `npm i -g node-sass` and change path to your project (theme or plugin) sass and css files on the tasks file.### Require Wp plugins and themes
1. use [composer.json or composer cli](https://wpackagist.org/)
2. if using docker, add themes or plugins to script/init.sh file to activate on wp cli when docker is up### Add Acf as a Must-Use Plugins
run this after you run `$composer install && composer update`
```bash
echo " wp-content/mu-plugins/advanced-custom-fields-pro.php
```