Commensal Escherichia coli, naturally occurring in the intestinal tract, can be the origin of extraintestinal pathogenic E. coli (ExPEC) strains. ExPEC causes high mortality and significant economic losses in the swine industry in several countries and poses a serious threat to public health worldwide. The aim of this study was to analyze the extended phylogenetic structure and extraintestinal virulence potential in two groups of commensal E. coli isolates from post-weaning piglets and sows. The phylogenetic assignment to eight groups was determined using the revised Clermont phylogenetic typing method in quadruplex PCR. Identification of extraintestinal virulence genes (VGs) and adhesin operon genes was performed using multiplex or simplex PCR. The revised phylogenetic assignment allowed us to distinguish E. coli with significantly higher (groups C and F) or lower (group E) virulence potential in isolates from piglets. The majority of the tested VGs occurred more frequently in isolates from piglets than from sows, with statistically significant differences for seven genes: fimH, papAH, iutA, iroN, ompT, traT, and iss. Complete operons for type I and P fimbriae significantly prevailed among E. coli from piglets. This study provides insight into the extended phylogenetic structure of porcine commensal E. coli and showed that these strains, particularly from piglets, constitute a considerable reservoir of extraintestinal VGs and may increase the potential risk of extraintestinal infections.