Custom WordPress install – activate custom theme

Twenty Seventeen is the default theme if no default theme has been defined.
line 359 from wp-includes/default-constants.php

if ( !defined('WP_DEFAULT_THEME') )
        define( 'WP_DEFAULT_THEME', 'twentyseventeen' );

You do not need to edit that file, however, to change this.

Simply define your theme in the file wp-config.php just before this line:

require_once(ABSPATH . 'wp-settings.php');

Like so:

define( 'WP_DEFAULT_THEME', 'my-new-default-theme' );
require_once(ABSPATH . 'wp-settings.php');