We find a family of exact solutions to the Einstein-Maxwell equations for rotating cylindrically symmetric distributions of a perfect fluid with the equation of statep=w rho(|w|<1), carrying a circular electric current in the angular direction. This current creates a magnetic field along thezaxis. Some of the solutions describe geometries resembling that of Melvin's static magnetic universe and contain a regular symmetry axis, while some others (in the casew>0) describe traversable wormhole geometries which do not contain a symmetry axis. Unlike Melvin's solution, those with rotation and a magnetic field cannot be vacuum and require a current. The wormhole solutions admit matching with flat-space regions on both sides of the throat, thus forming a cylindrical wormhole configuration potentially visible for distant observers residing in flat or weakly curved parts of space. The thin shells, located at junctions between the inner (wormhole) and outer (flat) regions, consist of matter satisfying the Weak Energy Condition under a proper choice of the free parameters of the model, which thus forms new examples of phantom-free wormhole models in general relativity. In the limitw -> 1, the magnetic field tends to zero, and the wormhole model tends to the one obtained previously, where the source of gravity is stiff matter with the equation of statep=rho.