Fix config.php when upgrade from version 5. Refs #2669