Extracting metallic magnesium from cholorphyll
You can make the magnesium salt, but electrolysis of an aqueous solution of this salt will reduce the water, evolving hydrogen, not reduce the magnesium.  You can get metallic magnesium via electrolysis of the molten chloride or high temperature reduction of the oxide with carbon,  neither of these cheap or easy.  See here.