Yes, preparing a pesto base in advance is a fantastic technique for saving time on busy weeknights, and it actually helps preserve the vibrant green color and fresh taste of the basil if stored properly.
To make the base ahead of time, blend your fresh basil leaves, garlic, a pinch of salt, and good quality extra virgin olive oil. You can also include the pine nuts or walnuts at this stage if you prefer, though some cooks like to toast and add them fresh for maximum aroma. Once blended, transfer the mixture to airtight containers or freeze it in ice cube trays for easy portioning. If you are keeping it in the refrigerator for a few days, always pour a thin layer of olive oil over the top to create an airtight barrier that prevents oxidation and browning.
The most critical ingredient you should leave out of the base and add only before serving is the grated cheese, such as Parmigiano-Reggiano or Pecorino Romano. Adding dairy too early can cause the pesto to turn gummy, dull the bright herbal notes, and shorten its shelf life, especially when frozen.
When you are ready to serve, simply bring your base to room temperature, stir in your freshly grated cheese, adjust seasoning if needed, and incorporate a splash of warm starchy pasta cooking water if you are tossing it with pasta to create a silky, emulsified sauce.