These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
What you could do is create a new Droplet with the LAMP image, then SSH to the droplet and make the necessary changes. After that shut down the droplet and take a snapshot.
Finally, you will be able to use this snapshot as a base image and spin up new Droplets from it. You can take a look at the official documentation on how to do that here:
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.