Earwigs are beneficials because they eat nuisances such as aphids, mites and undesirable nematodes, as well as other harmful insect larvae. They also eat decaying plant material in compost and break it down.
How do I attract earwigs?
It’s probably best not to look for ways to bring earwigs into your vegetable garden as a healthy garden will attract a few all by itself -- enough to do good work. They will most likely not harm your living plants, unless there is nothing else to eat. Earwigs are part of nature’s garbage disposal system and gobble mostly decaying plant matter. They are most beneficial in a compost pile.
If you have an earwig infestation, make a trap from a rolled-up newspaper. Tape one end shut, fill it with crumpled newspaper and then dampen. Place your trap near plants in the late afternoon or evening and empty or replace in the morning.