The ground under your feet is more than just dirt—soil is the foundation for growing bountiful vegetables, lush plants, and a thick lawn. However, if your yard’s soil quality is low, it can be a struggle to grow anything. Use these tips to help your yard flourish.

Test your soil

Growing plants successfully may come down to your soil’s pH level. You can measure it with a soil test kit, which can be purchased online or at your local garden center. The tests detect your soil’s pH levels, which will fall between zero and fourteen, with seven being considered neutral. The USDA states anything between six and seven is favorable for plant growth. Soil with a pH level below seven is acidic, while a level above seven is alkaline. An imbalance in either direction can affect your soil’s ability to support the growth of plants. Overly acidic soil creates deficiencies in specific nutrients, such as calcium and magnesium, while the concentrations of manganese and aluminum may become toxic for plants. Alkaline soil can cause iron deficiency in plants. There are several products you can add to your soil to improve its pH. For acidic soil, add limestone or wood ash, and for alkaline soil, add sulfur or aluminum sulfate. If you’d prefer not to tamper with your soil, a variety of plants thrive in acidic and alkaline soils. Try growing azaleas, rhododendrons, and blueberries in acidic soil, and lavender, honeysuckle, and forsythia if your soil is alkaline.

A soil test will also inform you about the levels of certain nutrients in your soil, such as nitrogen, phosphorus, and potassium. This information can help you plan the appropriate course of action. For example, you can increase nitrogen by adding blood meal or alfalfa meal, increase phosphorus by adding bone meal or rock phosphate, and boost potassium by adding greensand or kelp meal.

Add organic matter

Regardless of what type of soil you have, organic matter will help improve it by adding nutrients while enhancing its structure and water-holding capabilities. One of the most common sources of organic matter is one many gardeners are familiar with: compost. You can either buy compost or create your own. The best ingredients for your compost include leaves, brush trimmings, wood chips, and non-animal kitchen scraps. Other sources of organic matter include aged manure and grass clippings. Organic mulch is another option that slowly decomposes, adding organic matter to the soil while keeping it moist and preventing weed growth.

Aerate your yard

If the soil in your yard is compacted, passages that provide water, oxygen, and nutrients to the roots can become restricted. Aeration can be achieved by loosening the soil to deliver nutrients to the roots. Aerators fall into two categories: plug and spike. Spike aerators use pointed tines to drive tiny holes into your soil and are a good choice for mild compaction. Plug aerators use hollow tines that remove larger plugs of soil and work best in highly compacted soil or larger plot. Try to limit foot traffic in the areas you have aerated to avoid further compaction.

Rotate crops

If you have a fruit or vegetable garden, it can be helpful to rotate what you’re growing between different plots. You can use this same strategy with annuals. By continually growing the same crop in the same spot, nutrients may deplete after a few seasons. Rotating crops can also prevent the damage caused by disease and pests. Limit growing the same crop or a crop from the same plant family in the same spot to once every three or four years.

Add raised beds

If you’re still struggling to grow plants in your yard after following these tips, you may need to go up instead of down. An excellent way to overcome poor soil quality is to avoid it altogether by adding raised beds to your yard. This option allows you to create an area to grow plants where you can control the soil, and adding a mix of garden soil and compost will likely set you up for success. Choose a spot for your bed that receives at least six hours of sunlight a day, add mulch after planting, and avoid walking on your beds for best results.