If you’re hand watering your plants, time it so that the soil has a chance to dry out a bit before nightfall.
Earwigs prefer cool, moist areas, so you want to prevent any accumulation of excess moisture as much as possible.
Just like those wood piles you need to keep away from the garden, you also want to reduce the chances of earwigs hiding under dark, moist pots and planters.
Like many pests, earwigs hate the strong smells of certain plants like rosemary, lavender, peppermint, garlic, and onions.
Earwigs love to make their home in these types of organic materials, as well as other dark, damp, confined hiding places like compost piles and wood piles.