Deploy to an engine

Once you have a working Wagon site, you probably want to see it working online, with the backoffice and everything. That's the role of the LocomotiveCMS engine.

Important. The only requirement is to have somewhere (it can be online or locally) a running engine and an administrator account. Check out the engine installation guide for more information.

1. Edit your deployment settings

We assume that your Wagon sites are located under ~/workspace, and that you're using Textmate to edit your code. If not, please correct it accordingly.
cd ~/workspace
mate my_first_website/config/deploy.yml

Here is what your deploy.yml file should look like:

  password: easyone
  password: easyone
  password: easyone

The email/password credentials are owned by one of your LocomotiveCMS administrator accounts.

Note: You can have as many targets (test, …etc) as you want.

2. Push

You can either push the whole site or specify a type of resource.

Pushing the whole site:

cd ~/workspace/my_first_website
bundle exec wagon push staging

If you want to push your content entries (data/*.yml), add the --data option (or -d)

bundle exec wagon push staging --data

Pushing only a specific type of resource:

In some cases, you do not want to push the whole site. For instance, if you have just modified a single page, you do not need to push the assets too.

The available resource types are: theme_assets, snippets, content_types and pages.


bundle exec wagon push staging --resources=pages

You might prefer the shorter syntax:

bundle exec wagon push staging -r pages

What if the resource already exists within your target engine?

By default, the push command will not let you erase your target resources. That is why you will see the “skipped” label beside your resource name if you try to run the push command.

Unless you force it:

bundle exec wagon push staging --resources=pages --force
© 2017 LocomotiveCMS Terms of use Privacy Policy
Back to top