So to confirm: you set up a brand new Trellis project locally and got it all working with a default site?
Now you want to get it working with a project another developer gave you?
Your steps are generally correct. Although if that developer didn’t use Trellis you’ll need to do a DB search and replace to update paths.
Yes. I did that already, forgot including in the steps.
Also if you update the name of a site, you’ll need to do vagrant reload to update synced folders. Or just destroy it and start over.
The name of the site, as in, the domain? I’ll probably destroy it anyway.
For Sequel Pro, did you follow https://roots.io/trellis/docs/database-access/1?
Yes. I did. Actually, I just successfully connected to the database! My misunderstanding was the username “example_com”. Since the username isn’t defined in vault.yml, I was using “root” as username as number of tutorials on other websites suggested. Anyway, thank you for reminding me the page. I’ve spend 3 hours on this… a stupid mistake…
This is a huge leap from the regular WP development but I am slowly getting it…
After bunch of trials and errors, I was able to run the site… with some errors (class-wp-hook.php related) I believe they are caused by the PHP version. It needs to be PHP 5.6 (not PHP 7). How do I downgrade the PHP version in Virtualbox? I found this:
You are right. I decided to go that route. I did some digging after that. It seemed like something to do with a custom theme the developer created. After I disabled some add_filter function on the theme, everything works fine.
Despite the blank page, I was able to access to admin dashboard URL. When I got there, There was a message “Database Update Required” . So I hit YES. Then I was able to get into the admin dashboard directly. At that point, I realized there was no plugin installed - including advanced-custom-fields. That explains why the homepage was completely blank. Is the database update something to do with this?
This is the method I use. I keep a private github repo for each of my custom and premium plugins so that I can use them across projects. Which is mostly wishful thinking but hey, you never know.
Updating premium plugins becomes a chore (I have to download the update, then commit it to my repo for that plugin, then composer update each project that uses it) but it’s still “cleaner” than other options.
If you use ACF, there’s an even better way outlined here. Sadly it only works for ACF right now.