Best way of making config changes outside FreePBX

Hi,

Been working on a setup for the office, and a few things need to change regularly (at the moment, updated a cell phone number in a misc destination).

I was wondering what the best practice is for making changes to configurations, from for eg a PHP script?

Currently, I can find relevant config in the asterisk mysql db, and can update directly in there then run an equivalent of ‘amportal a r’ to apply those changes.

Sorry this is very basic, just doing some of my own research which might assist our app dev’s…

Thanks,

edit: this is freepbx 2.11 and asterisk 11.