We study the effect of large-scale magnetic fields on the non-axisymmetric Rossby wave instability ( RWI ) in accretion discs . The instability develops around a density bump , which is likely present in the transition region between the active zone and dead zone of protoplanetary discs . Previous works suggest that the vortices resulting from the RWI may facilitate planetesimal formation and angular momentum transport . We consider discs threaded by a large-scale poloidal magnetic field , with a radial field component at the disc surface . Such field configurations may lead to the production of magnetic winds or jets . In general , the magnetic field can affect the RWI even when it is sub-thermal ( plasma \beta \sim 10 ) . For infinitely thin discs , the instability can be enhanced by about 10 percent . For discs with finite thickness , with a radial gradient of the magnetic field strength , the RWI growth rate can increase significantly ( by a factor of \sim 2 ) as the field approaches equipartition ( \beta \sim 1 ) . Our result suggests that the RWI can continue to operate in discs that produce magnetic winds .