I was thinking, what kind of issues might I face if I port a plugin from WPMU to WP or vice versa.
Say I developed a plugin from scratch and wanted that plugin to be compatible with both, should I begin with WPMU or WP?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
You'll need to test in both setups, because they behave differently in a lot of situations. Some of the most notable differences are:
wpmu_new_blogaction. It has to switch to the new blog, do the activation logic, and then restore the current blog. The
$idof the new blog is passed in to the handler as the first parameter.
get_site_option( 'mu_media_buttons' )to check it and
update_site_option()to set it.
You can see a complete example of the activation functions by browsing the source of my plugin skeleton.
There is no difference.
WordPress MU is no longer a separate project; it is continuing development as part of the main WordPress branch under the name multisite or MS.
While developing use a multi-site installation, because sometimes file handling and paths are a little bit tricky.
If you've never built a plugin before, and you're planning on releasing one to the WordPress repository, then you're going to have a hard enough time fixing all of your WP bugs to even worry about WPMU compatibility.
Go with WP first and learn it inside and out. Then you can start learning about what makes a WPMU plugin different from a WP one.
A WP plugin is a plugin that is incompatible with WP Multi-sites. There's actually a lot of things that you need to understand about plugins to even begin to understand the WPMU dev requirements that you'll face.