## Further Thoughts

### Security

Perhaps you might be a little worried if you have to put your plaintext password in the configuration file. I just choosed that way to make the demonstration as straight forward as possible, but in the real world you might want to use a SSH key. You can import one like this:

### Database

For now we have just focused on deploying the actual files to their new home but in many scenarios you might also do something with your database. Laravel has a perfect tool for that: migrations. You could just add a new step where you run these migrations. After that our build task might look like this:

You also have to add this task in the transaction block of the update task. Now everytime you deploy, the database will be updated to your latest migrations.

### Rollback

Sometimes you deploy a non-working version of your application and you need to undo these changes. Capistrano has a built-in feature for that called "rollback". Just run:

## Conclusion

You've just learned a very simple way of deploying your application to your production server(s) with Capistrano. Once the configuration work is done, it just takes one command to deploy your latest version in seconds. But as mentioned earlier, this is not the only way to do this.

You should also check out the task runner grunt which suits perfectly for building and deploying JavaScript applications. A complete different approach takes docker which acts like a lightweight VM. The idea here is to deploy your whole environment as a virtual machine. Check them out!