add_action('after_setup_theme', function() { $file = get_stylesheet_directory() . '/my-file.php'; touch($file); });