We often hear a recommendation to test soil, including testing for soil pH. The question that many people may have is why should a gardener do this?
The answer is that many plant nutrients are readily available for uptake by plants at a specific ranges of pH. If pH is too low (acidic) or too high (basic, or alkaline), plant nutrients may be present in the soil or compost, but the plants may not be able to take them up and use them. Some plant nutrients are most available at low pH (example, iron), some are most available at high pH (examples, potassium, sulfur, molybdenum),
but there is a pH "sweet spot" that is close to the neutral range where most plant nutrients are adequately available for most plants. Generally, that ideal pH range is slightly acidic to neutral, some advice says pH 6.0 to 6.5, other sources might say pH 6.0 to 7.0.
An easy guide is a chart, used all over the world, like the one at this website: https://hgic.clemson.edu/factsheet/fertilizing-vegetables/Sometimes plants grown in a specific soil or compost will show plant abnormalities that point to plant nutrient deficiency (for example, yellow leaves, or leaf veins). Checking the pH first may be a better first step than trying to add more nutrients to compensate for a pH problem. The chart at that link shows that at pH 4 or 4.5, nutrient availability is very poor. Yet, with many commercial composts (based on peat, or wood products, or something else), the pH is very low (often between pH 3.5 to 4.5). Plants that germinated in such a compost,but stay in it too long, will start to show deficiency symptoms (
this website https://landresources.montana.edu/soilfertility/nutrientdeficient/ shows photographic examples of many nutrient deficiencies). There is a link there to a
free downloadable document,
Plant Nutrient Functions and Deficiency and Toxicity Symptoms that can help anyone to diagnose nutrient problems.
You can test for pH using a soil test kit, there are many available, many have good instructions. pH can also be measured using a pH meter; I personally don't trust any pH meter that is not calibrated to standards before you use it, and that is not temperature-compensated; most of the meters that meet those requirements are expensive. You can get good results from the simple test kits at much lower cost; accuracy to a decimal point (or two, or three) is more than adequate.
Soil or compost pH can be raised by adding lime or wood ash to it, and can be lowered by adding sulfur or an acidic compost. Some soils react faster, or slower to pH change, in part due to the composition of the soil; resistance to pH change is called buffering capacity (I won't go into that much detail, but if you wan to know more, you can try
https://www.agric.wa.gov.au/soil-acidity/soil-ph?page=0%2C1 That website has 3 pages, all of which have good information.).
I hope this information is useful to you.