Hi, I’m trying to migrate to Bedrock from OSX 10.7.5 MAMP installation. The reason: the new workflow with Gulp instead Grunt don’t sync with my browser. That problem was refered here but solution don’t works for me. So, I need to renew all my workflow.
I’m an old school designer with rudimentatry programming skills and I need more explanations than usually given in documentation. I lack of a lot of context that is needed to setup the framework and I don’t understand all the process and all the tools. I guess I’ll understand it on the fly. So, please, be patient and don’t close this thread until migration is completed. I’ll be posting here all my steps and questions. I hope this will be useful to some people like me.
This walkthrough was made starting from this installation guide
-
First, I need to install PHP 5.5 (latest allowed in my OSX 10.7.5).
As is explained here. [UPDATE Despite this PHP 5.5 installation I got this error. Finally I installed apache and PHP 5.4 through MacPorts. It seems to work]. -
I install MySQL and create a db for my first project.
-
I run apache server writing
apachectl start
at terminal or sharing web at pref panels. -
git clone of Bedrock at my own folder. Bedrock folder was created there.
-
Then, I run
composer install
inside bedrock folder I gess is the correct place because it is the only folder with a composer.json file. -
Then, I go to rename and edit .env.example file inside bedrock folder. It is invisible because its name start with a dot so, It must be viewed with terminal. In MAMP framework I work over a localhost. It means that my WP installation is served at localhost. With MAMP I can change the localhost dir easily when I change the working project but now i setup apache vhost to deal with several local projects. My first project .env file looks like
DB_NAME=telmo-merz
DB_USER=aitor
DB_PASSWORD=my_psw
DB_HOST=localhost
WP_ENV=development
WP_HOME=http://telmo-merz.e451.net/
WP_SITEURL=http://telmo-merz.e451.net/wp -
I git clone sage-master folder theme inside
bedrock/web/app/themes/
-
I get spanish translation .mo file and I put it into
/app/themes/my-theme/lang
/** -
I run
npm install
insidebedrock/web/app/themes/my_theme
folder -
I run
bower install
-
I run
gulp build
without errors. -
I edit
assets/manifest.json
updating"devUrl": "http://my-project.net"
-
I run
gulp watch
and WORKS!
Starting first Sage project
- At this point I’ve notice that default theme setup doesn’t includes nav walker bootstrap markup. Although it isn’t strictly required, I’ll install it for learning purposes following this walkthrough: How to restore the Bootstrap nav [walkthrough]
- I install and activate Soil, following this guide Soil | Cleaner WordPress Markup Plugin | Roots
- Restore old
templates/header.php
file http://pastebin.com/fr15YW0m - Download nav-walker bootstrap GitHub - wp-bootstrap/wp-bootstrap-navwalker: A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.
- Copy
wp_bootstrap_navwalker.php
tomy_theme/lib/
- Update
$sage_includes
intofunctions.php
with'lib/wp_bootstrap_navwalker.php', // Bootstrap nav walker
Dead end. Starting bedrock-ansible way.
- Following this installation guide GitHub - roots/roots-example-project.com: Example Roots stack project (Trellis, Bedrock, Sage)