Use a measuring tape to measure the width of the doorway you want to block with your pet gate. You may customize the height of your pet gate to suit your particular pet, but the standard height for pet gates is around 26 inches.
Cut two pieces of 1-inch PVC pipe with a pair of PVC cutters to a length of 26 inches. These pipes will serve as the vertical bars for your pet gate. Cut two more pieces of 1-inch PVC to about 4 inches less than the width of the doorway to serve as the horizontal bars for your pet gate.
Assemble the four pieces of 1-inch PVC in a rectangular shape, connecting them at the corners with T-shaped PVC connectors.
Cut two sheets of plastic or wire mesh to dimensions that are just a little smaller than your pet gate. Lay the pet gate flat on the ground, sandwiched between the two sheets of mesh, and secure the mesh to the frame using cable ties. Secure the mesh with a cable tie placed every 3 to 6 inches.
Slide a retractable curtain rod through both the top and bottom of the pet gate so the ends stick out of the T-connectors. Use a pair of curtain rods 2 to 4 inches longer than the width of the doorway so they will contract enough to keep the pet gate in place.
Install the pet gate by holding it upright in front of the doorway, angled inward so the ends of the curtain rods on one side are flush with the wall. Retract the curtain rods from the other end using your hands and slide the pet gate into the doorway. Release the curtain rods, allowing them to extend and hold the pet gate in place.