

Bedrock: a modern WordPress stack - bretthopper
https://github.com/roots/bedrock

======
bretthopper
I'm one of the creators of this (we're the same people behind
[http://roots.io](http://roots.io)) so I'm happy to answer any questions.
We're just trying to make developing WordPress sites a little more bearable :)

~~~
Xdes
Hi, I have not written a single of line of php. How hard would it be to get
started with a Ruby/Node/.NET background?

~~~
smacktoward
You probably won't have too hard a time. With that background, your main
challenge will be overcoming the wave of nausea that will sweep across you
when you realize that WordPress is a gigantic mass of procedural code studded
with inconsistently documented hooks and filters rather than something with a
nice, clean, easily extensible OO architecture. But with liberal applications
of patience and Pepto-Bismol, this feeling eventually passes.

~~~
wise_young_man
I believe WordPress is moving forward. Here is just one of the many OO
classes. You can also do OO in plugin development as well.

[https://github.com/WordPress/WordPress/blob/master/wp-
includ...](https://github.com/WordPress/WordPress/blob/master/wp-
includes/class-wp.php)

------
chc
Interesting. It looks like this completely circumvents the normal user-
configurable WordPress plugins and update architecture, such that the only way
to change anything is to update it in the source tree and redeploy like you
would with a normal monolithic app. I feel like this might be kinda
impractical for a lot of the cases where you would normally want to use
WordPress, but I suppose in the right situation it would be nifty.

~~~
bretthopper
Correct. It's definitely targeted towards developers and WP sites that are
controlled by them rather than front-end users.

It's usually not a great idea to let normal users install plugins and update
WordPress. For an analogy, you definitely wouldn't have users installing Gems
in a Rails app.

~~~
camus2
> It's usually not a great idea to let normal users install plugins and update
> WordPress. For an analogy, you definitely wouldn't have users installing
> Gems in a Rails app.

that's not the same thing, Installing a gem wont magically add a feature to
your rails app. Non developpers cant do it either(let alone deploying any ruby
app on a server).Installing Plugins on wordpress dont require any developper
knowledge.

~~~
bretthopper
Obviously it's not the exact same, but my argument is they should be _treated_
the same (when possible). First, a lot of WP plugins do require some dev work
to integrate. Second, non-developers have no idea what a plugin might change.
It could easily break your entire site.

Plugins should be installed on dev/staging and tested before just adding them
in production. Plugins in WP are a double-edged sword.

------
grimgrin
It's not a big deal, but in case you weren't aware:

[http://bedrocklinux.org](http://bedrocklinux.org)

It was posted here a few months ago:
[https://news.ycombinator.com/item?id=6504878](https://news.ycombinator.com/item?id=6504878)

~~~
bsilvereagle
I thought maybe paradigm got tired of Linux and picked up Wordpress when I saw
this.

------
Gipetto
Looks nice. Special kudos for managing much of the wp-config though the built
in config constants.

Only thing I don't like is the renaming of the root `wp-config` folder to
`app`. I'd much rather have the app reflect the underlying wordpress
conventions than to change it to look like something else. Yeah, consistency,
but boo for barrier of entry or having to remember that `app` == `wp-config`
when not everything we get to work on will get to use the shiny fandangled
tool.

~~~
bretthopper
Even Mark Jaquith's (WP core team member) WP Skeleton
([https://github.com/markjaquith/WordPress-
Skeleton](https://github.com/markjaquith/WordPress-Skeleton)) renames it to
`content`. If that's the only thing you don't like, then you can easily just
fork it and rename app to wp-content and change the couple config settings :)

------
Eclyps
I've been using a similar setup with Pomander and the Pomander-Wordpress
plugin. It's got a similar setup, but is 100% PHP-based, so I don't need to
have ruby on all my servers. Been using it in production on about 15 servers
for well over a year, and I'm pretty happy with it.

[http://ripeworks.com/pomander/wordpress.html](http://ripeworks.com/pomander/wordpress.html)

~~~
bretthopper
I looked at Pomander briefly before. It would be nice to use a pure PHP
solution and eliminate the Ruby dependency. So I'll have to give Pomander a
better look and if it works well, I have no problem replacing Capistrano with
it.

------
dabernathy89
Is it possible to still use the Composer-goodness of this stack with your own
deployment (or something like ftploy)?

How do you guys handle database syncing / deployment / rollback (if at all)?

~~~
bretthopper
Of course! If you read down the README there's a section on every part about
how to remove it if you don't want it. So you can either just not use
Capistrano or remove the files it uses as well.

We don't do anything about DB syncing for now. That's next big thing once we
get the Vagrant/server config work done. It's a popular topic but also
complicated since everyone has different use cases.

------
tuna
Any thoughts on creating docker images as alternative to capistrano ? There's
a couple of projects that can help on it (a Dockerfile could help on it) Good
job :)

------
abimaelmartell
wow, this is so nice, i don't like wordpress, but this changes everything

Thanks!!

