The main factors involved in fostering the conflict that contributed to WW1:
Beligerant Nationalism: the idea of engaging in a conflict to show supremacy, a notion where a war effort was seen as profitable, adventurous and many men were eager to enlist themselves to seek glory and fortune for the home country.
Industrialization:
The new wave of changes in production caused a surplus of goods and merchandises that caused a strong competition for domestic and then markets abroad.
Militarization and expanding German army:
Together with the Industrialization, discoveries and innovations took place to make armies even more professional.
Imperialism: Rivalries created in the distribution of colonies around the world. Germany entered late into this process, so it was demanding a more predominant role in the areas where British, and French especially had taken control as colonies in Africa.
Treaties and Alliances:
Any local conflict involved the consequent reaction of the allies, balance of power came to form blocs involving many nation states.