This is a simple plugin to define different server environments for a single Wordpress installation (local, stage, production).
The environment is updated if it is changed to have the matching configured siteurl and the permalinks are flushed.
Place the plugin files inside wp-content/plugins/deployment/ and activate it from wp-admin.