Wild pigs can destroy a garden. They will eat leaves and will also trample your prized plants, dig up their roots and possibly damage your trees by rubbing up against them. To peacefully coexist with wild pigs, take steps to prevent these marauders from getting into your garden and eliminate any of their preferred plants so they won't be attracted to them.
Put Up Fences
The best way to keep feral pigs out of your garden is to build a sturdy physical barrier around it that prevents them from getting in. Erect fences that are at least 3 feet tall to prevent pigs from jumping over them. Chain-link fences and those made with heavy-duty steel hog mesh should keep the wild pigs out of your garden, but you'll need to bury them at least 12 under the ground, recommends University of Florida IFAS Extension. Wild pigs are notorious diggers and can tunnel their way under your fence if it's not buried deep in the ground. Use strong supports and posts to reinforce your fence and keep the pigs out.
Electrify Your Fences
Wild pigs are tenacious and if regular fencing for your garden isn't keeping them out, try installing an electric fence or electrifying your current fence if it's made of tight wire mesh. These fences won't hurt the wild pigs but will discourage them from coming back once they get a harmless jolt from them. Ground the fence to improve its effectiveness and install an electrified "stand-off" wire in front of the fence, recommends the Texas Natural Wildlife website. Once a wild hog encounters the "stand-off" wire, it will be discouraged from even attempting to approach the main fence.
Eliminate Piggy Garden Favorites
Wild pigs might be tempted to come into your garden if it contains anything that they want to eat. Pigs have an excellent sense of smell and are attracted to fruits and vegetables, especially overripe ones, so pick up any fallen fruit or vegetables in your garden. Sweet fruits, like strawberries (Fragaria spp.), and other berries are a favorite of pigs. Strawberry plants grow in U.S. Department of Agriculture plant hardiness zones 3 through 10. Don't grow any tasty berry plants in your garden or place them in an enclosed greenhouse to discourage pigs from seeking them out. Most importantly, keep any pet food out of your yard because it may attract pigs.
Consider Other Deterrents
Chemical deterrents don't work for wild pigs. You can try placing motion-activated wildlife deterrents in your garden to deter pigs, such as sprinklers or devices that produce a loud sound. Unfortunately, most pigs are smart and will become used to wildlife deterrent devices within a few days. The presence of humans in the garden tends to deter wild hogs, so try a scarecrow in your garden to keep them away. Move it around every few days to make it more effective.