1848 saw massive numbers of uprising in Central Europe. Let us imagine that liberal Hungary successfully breaks off from Austria, Sardinia unifies Italy under a liberal constitution, and this convinces Kaiser Wilhelm I to take the offer of the Frankfurt assembly to ascend to the throne of a unified liberal Germany. Would this butterfly away World War I?
No it wouldn't.
First of all while revolution was "liberal" in the sense that it demanded greater popular participation in government and was opposed to the absolute monarchies and nobility it was also very nationalistic, and not liberal in their treatment of minorities inside their nation states. A German empire encompassing Posen and Czechia might allow the Poles and Czechs to elect representatives to the imperial parliament but demographics alone would ensure that they stayed marginalised and they would likely be the subject of at least an unofficial germanisation. Furthermore the different nationstates had conflicting ideas of where their borders should be:
For example in the "Song of Germans", which would later become the national hymn of Germany, the writer proposes the borders of Meuse (which is quite a bit within France), Etsch (i.e. claiming South Tyrol). Of course it is only a song (and only one of many) but it shows that the proposed borders were quite expansive.
Italy also had some quite impressive claims and gave us the word "irredentism".
Hungary did not have any claims, but that was because it was at its biggest and included many other people (Slovaks, Croats, Romanians) and only about half of its inhabitants were Hungarians.
In France the idea to reexpand to the Rhine has Napoleon had done was often discussed - which had been the impetus for writing "the "song of Germans".
So even if all four nations are governed by liberal governments this would by no means guarantee that they become allies. I can easily see Germany and Hungary allying over the joint oppression of Slavic people (Poles and Czechs in Germany, Croats and Slovaks in Hungary) but that is only going to bring them into conflict with Russia which viewed itself as a protector of all Slavs. So a Great war between the European powers still looks likely.
But what if the liberal nations would be more accepting of minorities and the right of self-determination? While I view it as less likely it is by no means impossible. For example while the song of germans does claim South Tyrol, the reference to the Etsch makes it clear that Lombardy - which belonged to Austria - would not be included. Likewise the author omits to name any demarcation in southern part of the Western border, as there is no mention of e.g. the Vosges, mainly because there was no consensus where to put the border in this region.
So it is possible that the newly founded nations of Germany and Italy - which would after all have been allies in the fight against Austria - decide to settle their borders amicably with a vote amongst the inhabitants. This would be helped by the mountainous geography which had resulted in relatively clear linguistic borders. This would likely result in Trentino becoming part of Italy while South Tyrol becoming part of Germany.
Furthermore, if Germany and Hungary become allies this would mean that a significant minority of Germans would live in another friendly country which could bring about the recognition that not all Germans have to be integrated into Germany itself, but that it is sufficient to be on good terms with the local government.
If this happens then it is possible for all four "revolutionary" countries to become allies. However, this would by no means reduce the chance of a world war. On one hand a coalition of countries accepting the self-determination would be ideologically opposed to both Russia and the Ottoman empire. If Germany becomes more accepting of Polish nationalism and allows such parties in Posen, this would bring it into conflict with Russia which owns the core part of Poland - and after the breakup of Austria likely also Galicia.
Furthermore, France, Germany and Italy would also try to gain colonies brining them into conflict with Britain, which is anyway unlikely to be happy about an alliance encompassing all of central Europe.
So a successful revolution of 1848 is won't affect the chances of a world war occurring - although it would obviously be radically changed.