Open your library and select it within Final Cut Pro. You'll see something like this:
Click on Modify Settings and set your Media and Cache location to outside your library. It's okay to have your Motion Template included in your library. As soon as you click save you can get a dialog like this:
Click on Include. Your Render Files will now be moved outside of your library to the new Cache location.
Now go back to the preferences pane for your library and click on the Consolidate button for your Media.
You will then see a dialog like this:
Select another destination for your Media (as long as it's not inside your Library) and make sure to include every media type. Click on OK and your media will moved to your new location.