10. Command Line Tools

10.1. Page commands

  • Update core routes, from routing files to page manager

bin/console sonata:page:update-core-routes

You could also remove orphan pages with the --clean option.

bin/console sonata:page:update-core-routes --clean
  • Create snapshots from defined pages

bin/console sonata:page:create-snapshots
  • Cleanup snapshots

bin/console sonata:page:cleanup-snapshots --keep-snapshots=5
  • Create blocks

bin/console sonata:page:create-block-container --templateCode=default --blockCode=content_bottom --blockName="Left Content"
  • Clone site with pages

bin/console sonata:page:clone-site --source-id=1 --dest-id=2 --prefix=Foo

Please note that you can also give multiple website identifiers to some commands, this way

bin/console sonata:page:update-core-routes --site=1 --site=2 --site=...
bin/console sonata:page:create-snapshots --site=1 --site=2 --site=...
bin/console sonata:page:cleanup-snapshots --site=1 --site=2 --site=...