My name is Sebastiaan and i’ve been developing a website for a client locally on my pc.
My first time using the roots projects and I love the Trellis + Bedrock + Sage combination. Learned a lot from the roots projects!
I’m still a rooky, so i wanted to first experiment with a naked trellis+bedrock install online on a DigitalOcean droplet.
The /srv/www/example.com/logs/error.log is as follows:
2018/05/22 12:20:59 [error] 15617#15617: *1 rewrite or internal redirection cycle while internally redirecting to “/index.php”, client: 62.251.35.104, server: sebastiaan-dekker.nl, request: “GET / HTTP/1.1”, host: “sebastiaan-dekker.nl”
2018/05/22 12:21:02 [error] 15617#15617: *2 rewrite or internal redirection cycle while internally redirecting to “/index.php”, client: 62.251.35.104, server: sebastiaan-dekker.nl, request: “GET /favicon.ico HTTP/1.1”, host: “sebastiaan-dekker.nl”, referrer: “http://sebastiaan-dekker.nl/”
DNS & Nameservers
I got my domain registered on mijndomein.nl. There i changed the default DNS to point to the DigitalO droplet ip-adres (not sure if this is needed if you also change the nameservers, in order to use the DigitalO DNS).
At mijndomein.nl i also changed the nameservers to match those of the DigitalO nameservers (this was needed to activate the DigitalO DNS:
Checked the error.log through ssh login into server.
Error log says:
2018/05/23 07:01:38 [error] 6205#6205: *6 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/srv/www/newdealseals.com/releases/20180523065938/web/app/mu-plugins/newde
alseals/seals-post-types/rubber-seal.php): failed to open stream: No such file or directory in /srv/www/newdealseals.com/releases/20180523065938/web/app/mu-plugins/newdealseals.php on line 7
PHP message: PHP Fatal error: require_once(): Failed opening required ‘/srv/www/newdealseals.com/releases/20180523065938/web/app/mu-plugins/newdealseals/seals-post-types/rubber-seal.php’ (include_path=’.:/usr/share/php’) in /srv/www/newdealseals.com/releases/20180523065938/web/app/mu-plugins/newdealseals.php on line 7" while reading response header from upstream, client: 213.125.96.154, server: sebastiaan-dekker.nl, request: “GET /wp/wp-admin/install.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php-fpm-wordpress.sock:”, host: “sebastiaan-dekker.nl”
Found out after 3 hours that your custom Sage theme needs some composer and npm installations as well. Solution with Trellis: Uncomment the right lines in deploy-hooks/build-before.yml Rookie lesson 2: Sage needs composer and npm installations on itself. Trellis has the godmode solution in deploy-hooks/build-before.yml.
Rebuild droplet -> Provision server -> Deploy with Sage hooks activated.
Still got the same error.
I bought the ‘Theme development with Sage’ book. It helped me out big time and i’m going to donate to the roots fund, cause i learned lots and lots. The whole workflow with the roots projects feels so fast and flexible compared to developing with the ‘Genesis Framework’.
In chapter Starting a project -> Planning out the theme, the authors advice to ‘Keep site functionality outside of the theme’. I followed the example mu-plugin setup from the Roots website like this: