alexanderdejong.com

Wordpress Developer

  • Home
  • Blog
  • Projects
  • Contact
You are here: Home / Archives for sage

How to Install Roots Bedrock on a Digital Ocean Droplet running on Serverpilot via SSH

Posted on May 25, 2017 Leave a Comment

I assume in this post that you have already installed Serverpilot on your DigitalOcean Droplet, you have some basic Composer knowledge and that you are already connected to your server via SSH (using Putty for example).

Create an app in your Serverpilot Dashboard and install Bedrock

Start by creating a fresh app on your development server with your preffered username. Next SSH into your server and run the following command inside your app directory. I ran the following commands to get to my directory and downloaded Bedrock using the following commands:

cd /srv/users/**username**/apps/**appname**/
composer create-project roots/bedrock

Your directory should look likes this in order for the next command to work:

CHANGELOG.md   composer.lock  LICENSE.md  README.md  web
composer.json  config         public      vendor     wp-cli.yml

If your bedrock files are in a folder called bedrock. Then you can run the following command to move all the files to the /**appname**/ folder.

mv bedrock/* ./

Then run a syslink command to connect your (empty) public folder to the web folder of Bedrock.

ln -s /srv/users/**username**/apps/**appname**/web /srv/users/**username**/apps/**appname**/public

Congrats! Bedrock is now installed and now you just have to fill in your Database information in the .env file located in the main folder of your app.

Filed Under: WP Tutorials Tagged With: bedrock, development, roots.io, sage, serverpilot

How to Install Roots Sage 8.5.1 on a Digital Ocean Droplet running on Serverpilot via SSH

Posted on May 1, 2017 Leave a Comment

This week, I have been looking at Sage Roots 8.5.1 to install on my server. I would like to get into some more modern workflow and hopefully save some time in the long run while developing websites.

Sage has a big update coming and they plan on using Yarm, Boostrap 4 and more.

Therefore, the install is a litle bit different for the latest version of Sage. Don’t mix them up. I decided to go for the latest stable build but was pulling in the build from Github, obviously this won’t work as the stable build still uses Gulp and Bower. I have used these in the past and still remember it quite well so it wasn’t too hard to setup. Basically, I followed the Theme installation instructions here.

Connect to your Server and run the following command in your themes folder

Serverpilot Composer is a little bit different, so instead of “Composer” you have to use: “composer7.1-sp” as shown below.

# @ example.com/site/web/app/themes/
$ composer7.1-sp create-project roots/sage your-theme-name 8.5.1

Install NodeJS, NPM, Bower and SASS on Ubuntu

Next I installed all of the above using the following commands:

$ sudo apt-get update
$ sudo apt-get install nodejs

In this case, we also need to install npm, which is the Node.js package manager. You can do this by typing:

$ sudo apt-get install npm

Lastly, we still need Bower and SASS. We can use:

$ sudo bower install
$ sudo npm install node-sass

I got an error when I was trying to install SASS, if you do get an error then check if everything has been installed okay with:

$ nodejs --version
$ npm --version

If you see that everything is installed and well then you might have to create manually a symlink /usr/bin/node. Shortcut for bash compatible shells:

$ sudo ln -s `which nodejs` /usr/bin/node

Or if you use non-standard shells, just hardcode the path you find with which nodejs:

$ sudo ln -s /usr/bin/nodejs /usr/bin/node

Now you can run the commands to kickstart your Sage project, navigate to your theme directory and run these two commands:

$ npm install
$ bower install

For more info on which commands you can run just check out the Sage Tutorial for version 8.5.1.

Update 6/6/2017

Small Github Workflow

This is more of a reminder for myself so that I remember what to do next. I started to work with Github with an external development server. I decided not to use a local one because I’m always connected to the web and my backups always run in the cloud.

First off I authenticated my development server with Github using this guide.

Then I pushed my projects to Github using the following (also borrowed from github guide).

git init
# Add the files in your new local repository. This stages them for the first commit.

git add .
# Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.
Commit the files that you've staged in your local repository.

git commit -m "First commit"
# Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.
Copy remote repository URL fieldAt the top of your GitHub repository's Quick Setup page, click  to copy the remote repository URL.

In Terminal, add the URL for the remote repository where your local repository will be pushed.

git remote add origin remote repository URL
# Sets the new remote
git remote -v
# Verifies the new remote URL
Push the changes in your local repository to GitHub.

git push origin master
# Pushes the changes in your local repository up to the remote repository you specified as the origin

After this, everything was working for me! Now I’m off to install the setup with Bedrock, so more coming soon!

Filed Under: Wordpress, WP Tutorials Tagged With: digital ocean, install, roots.io, sage, serverpilot

Recent Posts

  • Migrating a WordPress Website Manually with Phpmyadmin, Search and Replace, DigitalOcean and Runcloud
  • How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • How to Install Roots Bedrock on a Digital Ocean Droplet running on Serverpilot via SSH
  • Linux SSH Useful Server Commands to Remember: Grep, Permissions and more.
  • How to Install Roots Sage 8.5.1 on a Digital Ocean Droplet running on Serverpilot via SSH

Find more content

Affiliate links
  • cheap shared hosting
  • low priced virtual servers only 5$
Affiliates
  • If someone buys a product then I get a commission.
  • You pay the same price using my affiliate links.
  • I can spend more time making newsletters and tutorials.
  • Thanks for visiting!

Connect with me

Recent Comments

  • Pedro Gómez on Migrating a WordPress Website Manually with Phpmyadmin, Search and Replace, DigitalOcean and Runcloud
  • Tim Delmeire on How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • Jaehyuk J Yang on How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • Alexander de Jong on A guide on customising the membership experience with Theme my Login (TML)
  • Judit Sarkany on A guide on customising the membership experience with Theme my Login (TML)

Recent Posts

  • Migrating a WordPress Website Manually with Phpmyadmin, Search and Replace, DigitalOcean and Runcloud
  • How to add Total Price Calculation to your WooCommerce Product Page with AJAX
  • How to Install Roots Bedrock on a Digital Ocean Droplet running on Serverpilot via SSH
  • Linux SSH Useful Server Commands to Remember: Grep, Permissions and more.
  • How to Install Roots Sage 8.5.1 on a Digital Ocean Droplet running on Serverpilot via SSH

Copyright © 2014 | Alexander de Jong | About | Contact | Privacy | Sitemap