Video Tutorial for Setting Up Trellis and Deploying to Production

Hey @Joe_Thomas

This video series should help, but do note that this is for Sage 8, not Sage 9 (which is the current master branch for Sage):

https://www.youtube.com/watch?v=_a_QIWZWZcw&t=9s

Hey @jlengstorf, just watched your tut. Loved it! Itā€™s funny how Iā€™ve done tons of Roots installs over the years, but I always learn something new from other peopleā€™s processes.

I mainly watched it for the WP Sync DB because Iā€™d never messed with that before. I watched it on 2x speed. So your 20 minute tutorial will probably end up saving me days worth of time!

A couple notes:

ā€¢ You asked for tutorial requestsā€“ personally Iā€™d love to see you configure the smtp stuff. Iā€™ve never done that either.
ā€¢ My workflow is a little different. I use Githubā€™s desktop app because I figured itā€™d have a lower barrier of entry for anyone Iā€™m working with whoā€™s never used Git before. To my surprise, I think it way less steps than running Git/Github through command line. (see here: https://youtu.be/17Zg_Rh38ug?t=4m33s)

Keep up the great work man!

That WP Sync DB workflow is no joke. :slight_smile:

SMTP could be a good add-on to this tutorial; Iā€™m collecting tutorial ideas over at GitHub if you donā€™t mind opening an issue for that.

Iā€™ve seen the GitHub app before, but I found that itā€™s excellent until you need to do something other than commit (such as unstaging a change). I watched a beginner irrevocably destroy an entire repo because the UI didnā€™t make it clear if she was about to remove the commits or remove the files. (It removed the files, which hadnā€™t been committed.) So Iā€™m wary. :slight_smile:

Thanks for the feedback! I appreciate it.

1 Like

Yeah itā€™s actually shameful I havenā€™t done much DB syncing until now. I was planning out my morning thinking of adding a bunch of woocommerce products to a staging env, which will be pushed to production in the next week or two. I was thinkingā€¦ either I can spend an hour duplicating it all manually, or I can just spend an hour getting DB syncing setup. DRY methodology FTW.

Will do, Iā€™ll add that request to the github repo.

Re: The Github app, exactly. Iā€™ve learned the hard way, if youā€™re doing anything other than committing, donā€™t do it in the app! :slight_smile:

Yes, this is great thank you! One questionā€¦ does it matter how you install Ansible on your Mac? I noticed that you used Brew. The official doc recommends ā€œpipā€ http://docs.ansible.com/ansible/intro_installation.html#latest-releases-on-mac-osx.

Also here is another tutorial I found ( actually 3 parts) which is also excellentā€¦ much thanks to Jimmy Smutek

Much thanks for these tutorials! Iā€™d love to see something on trellis with multiple sites. e.g. Best practice for Trellis with multiple sites

1 Like

@masoninthesis & @jlengstorf : First, thank you both for the videos. They really cleared up a whole lot of questions I had and helped set up for the first time. I still go back and reference them.

Have you heard of, or used, VesrionPress before? I just stumbled upon it and it looks very promising.

@Sergio My pleasure.

VP looks interesting. Havenā€™t used it, but would definitely like to hear opinions if some has.

@jlengstorf Ever used WP Migrate/Sync from the command line? If you have, Iā€™d love to see how thatā€™s done, potentially even automated in the build/deploy process. :slight_smile:

I havenā€™t tried it in the command line yet. Itā€™s on my (ever-growing) list of things to experiment with. :slight_smile:

Iā€™d recommend reading this blog post and the comments that go with it :slight_smile:

Lots of good stuff for syncing environments via the command line.

1 Like

As a designer, this video tutorial by @jlengstorf helped me tremendously to make the leap from a shared hosting setup to a VPS.

Had my down moments in he process as described here. Fortunately, @fullyint came to the rescue with quick fixes.

For anyone else going through this tutorial, wp-sync-db needed a lower composer installer in order to be installed, so Iā€™ve updated ā€œcomposer/installersā€: ā€œ~1.0.6ā€ in composer.json and composer.lock. (If thereā€™s a better workaround please share but this seems to work okay).

Additionaly, wp-sync-db admin panel become unresponsive once activated in local environment. Iā€™ve tracked the solution to Commit #120.

Very happy with current setup.

Thanks again @fullyint and @jlengstorf and the rest of the Roots team.

2 Likes

As an aside, I think itā€™s worth mentioning the origin of, and the history behind ā€œwp-sync-dbā€, which is just a fork some dude made of the premium version of WP Migrate DB Pro.

3 Likes

This rookie had a heck of a time all week with your tutorial, but it made it possible! The biggest difference for any other newbie is to make sure the DO Droplet has the updated Ubuntuā€¦

My biggest headache and the only thing keeping me from being successful is the ā€œwp-sync-dbā€ processā€¦ I have tried everything to make this work, but to no successā€¦ Iā€™ve also manually added these to the app/plugins folder, and git wonā€™t see these within the git add -Aā€¦

Any ideas? Here is my composer file.

>     {
>   "name": "boothwise",
>   "type": "project",
>   "license": "MIT",
>   "description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
>   "homepage": "https://roots.io/bedrock/",
>   "authors": [
>     {
>       "name": "Scott Walkinshaw",
>       "email": "scott.walkinshaw@gmail.com",
>       "homepage": "https://github.com/swalkinshaw"
>     },
>     {
>       "name": "Ben Word",
>       "email": "ben@benword.com",
>       "homepage": "https://github.com/retlehs"
>     }
>   ],
>   "keywords": [
>     "bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
>   ],
>   "support": {
>     "issues": "https://github.com/roots/bedrock/issues",
>     "forum": "https://discourse.roots.io/category/bedrock"
>   },
>   "config": {
>     "preferred-install": "dist"
>   },
>   "repositories": [
>     {
>       "type": "composer",
>       "url": "https://wpackagist.org"
>     }
>   ],
>   "require": {
>     "php": ">=7.1",
>     "composer/installers": "^1.4",
>     "vlucas/phpdotenv": "^2.0.1",
>     "oscarotero/env": "^1.1.0",
>     "roots/wordpress": "5.0.2",
>     "roots/wp-config": "1.0.0",
>     "roots/wp-password-bcrypt": "1.0.0"
>   },
>   "require-dev": {
>     "squizlabs/php_codesniffer": "^3.0.2",
>     "roave/security-advisories": "dev-master"
>   },
>   "extra": {
>     "installer-paths": {
>       "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
>       "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
>       "web/app/themes/{$name}/": ["type:wordpress-theme"]
>     },
>     "wordpress-install-dir": "web/wp"
>   },
>   "scripts": {
>     "post-root-package-install": [
>       "php -r \"copy('.env.example', '.env');\""
>     ],
>     "test": [
>       "phpcs"
>     ]
>   }
> }

composer require wp-sync-db/wp-sync-db:dev-master@dev

shows this errorā€¦

Problem 1
- Installation request for wp-sync-db/wp-sync-db dev-master@dev -> satisfiable by wp-sync-db/wp-sync-db[dev-master].
- wp-sync-db/wp-sync-db dev-master requires composer/installers ~1.0.6 -> satisfiable by composer/installers[1.0.x-dev, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.16, v1.0.17, v1.0.18, v1.0.19, v1.0.20, v1.0.21, v1.0.22, v1.0.23, v1.0.24, v1.0.25, v1.0.6, v1.0.7, v1.0.8, v1.0.9] but these conflict with your requirements or minimum-stability.

So I changed the composer number to ~1.0.6ā€¦ no successā€¦

Has anyone recently had luck?? Iā€™ll send beer money if you can help! <3

Locking this thread as itā€™s 2 years old and wp-sync-db is an unethical version of a paid product (WP Migrate DB Pro) that we donā€™t recommend using and will not support here

2 Likes