Refactor attaching domain to site command and handle single pages

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2 jobs for fix-command-attach-domain-for-single-pages in 4 minutes and 12 seconds
Status Job ID Name Coverage
  Test
passed #122517
test_php7.0

00:04:12

passed #122518
test_php7.1

00:04:07