Composer backed project for easy WordPress sites.
Used to depend on the Simple Framework.
Learn more about Simple and its components or skip to the good stuff
- Simple ( parent framework )
- Simple Child ( child framework )
- VVV Simple ( an alternative to Presto, if you have vagrant setup, run this instead, a one click solution so to speak )
Want your mac to dev fly shit all day? check it homie.
You have a similar setup to the link above.
- Latest WordPress
- Composer
- themes - Simple Framework/Child (optional)
- plugins
- See full list within composer.json and Readme files.
- .htaccess ( Currently ignored from repo )
- permalinks
- media redirection to remote
- project repo should also house a db dump
- Clone repo ( with submods if present ) and run composer.
$ git clone --recursive https://raw.github.com/kiriaze/PressPlay {Project-Name}
$ cd {Project-Name}
$ composer install
- Run ghost. ( Optional, sqlite instead - skip to #8 )
- ( Follow instructions through cli )
curl -s https://raw.githubusercontent.com/kiriaze/ghost/master/ghost.sh > /tmp; bash /tmp/ghost
- Create your database. ( Or use SequelPro / Also optional )
# Default
$ mysql -u {username} -p {password} -e "create database {databasename};"
# If dev env setup with mac-dev-env/homebrew, use the line below instead
$ mysql -u root -p -e "create database foo;"
- Update git remote in root of project and subsequent files.
# Remove git from root of your project
$ rm -rf {Project-Name}/.git
# Add your new remote to the root of your project
$ git remote add origin https://path-to-repo.com/repo.git
# Remove git from project theme
$ rm -rf {Project-Name}/wp-content/themes/{project-theme}/.git
-
Update Naming Conventions
-
Rename Simple-child to {Project-Name} ( Or Simple-Framwork depending on which you choose to use )
-
Update wp-content/themes/{Project-Name}/style.css naming refs, and should reflect the code block below.
/* Theme Name: Project Name Theme URI: http://projectname.com Author: Project Author Author URI: http://projectauthor.com Description: An awesome description. Template: simple Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: simple */
-
Update
wp-content/themes/{Project-Name}/assets/js/app.js
naming refs# Update all THEMENAME/SHORTNAME refs within file # THEMENAME is the full name of your project, e.g. MyAwesomeProject # SHORTNAME is the acronym of the THEMENAME, e.g. MAP var SHORTNAME = window.THEMENAME; // example before var MAP = window.MyAwesomeProject; // example after
-
-
Set permissions to project directory ( WP Updates Specific )
$ sudo chown -R _www {Project-Name}
$ sudo chmod -R g+w {Project-Name}
- Update wp-config.php credentials to connect to your db.
- Direct browser to {Project-Name}.dev/admin
- Make dope shit yo.
-
When updating gitignore, run
$ git rm -r --cached .
then re add/commit -
Add acf-pro license into wp admin.
-
If you add other plugins to your project, you have two options to keep them in sync.
- Exclude from .gitignore with
!wp-content/plugins/{plugin-name}
- Add plugin to composer.json and run
composer update
- Exclude from .gitignore with
-
DB search/replace mysql query { When importing/exporting local/remote dbs }
update wp_posts set guid = replace(guid, "OLD", "NEW"); update wp_options set option_value = replace(option_value, "OLD", "NEW"); update wp_posts set post_content = replace(post_content, "OLD", "NEW"); update wp_postmeta set meta_value = replace(meta_value, "OLD", "NEW");
-
If repo was cloned without submods as in step 1 from Installation, then run this to correctly setup submods.
git submodule update --init --recursive
- Add mysql db creation to script
- Creds via .env
Constantine Kiriaze http://www.kiriaze.com @kiriaze