Title: Programmatically adding domains
Last modified: August 20, 2016

---

# Programmatically adding domains

 *  [nfitbh](https://wordpress.org/support/users/nfitbh/)
 * (@nfitbh)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/programmatically-adding-domains/)
 * Hi there,
 * Firstly thanks for the excellent plugin.
 * I would like to programatically update a site to being a domain site (i.e. not
   rely on any actions through the wp-admin pages). The best I can find so far is
   to rip the code out of dm_handle_actions(), however before doing this, I’d like
   to see if there is a better way of solving this problem?
 * I was thinking of moving all the specific actions in dm_handle_actions() into
   their own functions which would form an API for other developers. Would you like
   me to contribute this change back?
 * Thanks!
 * [http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/](http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [nfitbh](https://wordpress.org/support/users/nfitbh/)
 * (@nfitbh)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/programmatically-adding-domains/#post-3631135)
 * In fact, we need this change so badly that I’m going to write a separate class
   of all of the database transactions which would be called from the current function
   list. I’ll start with the ones that we specifically need, however if I can contribute
   these changes back into the core then I’ll finish the job and abstract all database
   calls into the separate class.
 * In this way, other developers would be able to programmatically use this plugin
   and the database layer could be kept separate from the page action code.
 * Let me know your thoughts please.
 * Thanks,
 * Neil

Viewing 1 replies (of 1 total)

The topic ‘Programmatically adding domains’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-mu-domain-mapping.svg)
 * [WordPress MU Domain Mapping](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-mu-domain-mapping/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [nfitbh](https://wordpress.org/support/users/nfitbh/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/programmatically-adding-domains/#post-3631135)
 * Status: not a support question