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 Name Job ID Coverage
  Test
passed test_php7.0 #122517

00:04:12

passed test_php7.1 #122518

00:04:07