diff --git a/plugins/TestRunner/templates/travis.yml.twig b/plugins/TestRunner/templates/travis.yml.twig
index 3c2b0f662d9844c567d7f2b99f3629dec313b6e7..5f8e97936dcd257fd30d0fc78ecb608dbf9cb0ad 100644
--- a/plugins/TestRunner/templates/travis.yml.twig
+++ b/plugins/TestRunner/templates/travis.yml.twig
@@ -94,14 +94,14 @@ install:
   - git fetch -q
 {% endif %}
 {% if generationMode == 'plugin' %}
-  # move plugin contents to folder in the plugins subdirectory
-  - rm -rf plugins/$PLUGIN_NAME
-  - mv ../$PLUGIN_NAME plugins
-
   - ./tests/travis/checkout_test_against_branch.sh
   - git submodule init -q
   - git submodule update -q || true
 
+  # move plugin contents to folder in the plugins subdirectory
+  - rm -rf plugins/$PLUGIN_NAME
+  - mv ../$PLUGIN_NAME plugins
+
   # copy .coveralls.yml if none exists
   - if [ ! -f ../coveralls.yml ];
     then cp .coveralls.yml ../coveralls.yml || true;