• SFCL and SMES improve the weak performance of virtual synchronous during the fault. • The location of SFCL and SMES affect the transient behavior of the equipped microgrid. • The optimal allocation of SFCL and SMES led to the improvement of the voltage and power of PV and wind during the fault. Voltage drop during fault can affect the performance of generation units such as wind turbines. Due to low inertia, virtual synchronous generator (VSG) exhibits poor performance during the fault. The superconducting fault current limiter (SFCL) and superconducting magnetic energy storage (SMES) can improve the fault ride-through (FRT) properties in doubly-fed induction generator (DFIG) and photovoltaic (PV) systems. This paper investigates the FRT property in a meshed microgrid including wind and PV units with a virtual synchronous generator controller. To improve the fault-ride-through, an SFCL and an SMES are proposed, whose optimal locations are obtained considering an objective function including the power deviation of the point of common coupling (PCC), DFIG voltage deviation, maximum fault current, and equipment specifications. Particle swarm optimization (PSO) is used for solving the optimization problem. The effect of SFCL and SMES on the reduction of voltage drop and power fluctuations and also on limiting the maximum fault current of distribution lines is analyzed. Finally, the status of the studied system variables is investigated in two scenarios associated with various fault locations with equipment optimally allocated.