How to programmatically do the following operations related to a new site creation programmatically

Hello,

I wish to create a custom plugin for a custom billing solution that does the following, basically all the following are operations related to creating a new user site under my WPMU site-
(1) I wish to do all of the above programmatically-- ie. not through the WPMU dashboard, but via PHP code- this code can be either made part of my WPMU install (as a plugin) or it can be external code (on another server) that connects to the WPMU database and does the above.
Please let me know which approach you recommend and why(ie code as plugin of the WPMU install or code external to that WPMU install which basically directly does DB operations). Please provide answers to the other points according to your answer to this point.
(2) Create a new site for specified user- with specified user id/email id/name/password.
(3) Assign title and description for this site.
(4) Link either a subdomain/subfolder/regular domain to the newly created site within my WPMU install.
(5) Assign a specific theme (from all available existing WPMU themes) to this user.
(6) Enable or disable theme editing/uploads for that site only.
(7) Enable some specified plugins for that site only.
(8) Enable or disable plugin editing/uploads/deletions for that site only.
(9) Does the domain assignment change if I use a plugin like W3Total Cache? What should I do then?

How can I do all of the above? If you can provide me with clear instructions that would be a great help.

Yours sincerely,
Arvind.

  • Arvind
    • Site Builder, Child of Zeus

    Hi,

    Thanks Mort3n- I think a lot of functionality of ProSites will be useful for me.

    However I still need more info on the following-

    (1) How to delete a site programmatically( site is a specific site under my WPMU)
    (2) How to enable a site under my WPMU install to use Marketpress
    (3) How to disable a site under WPMU from using Marketpress
    (4) How to delete all data under a site's marketpress (after step 3 above).

  • mort3n
    • The Crimson Coder

    Hi Arvind,

    You're welcome :slight_smile:

    1) That would depend on the criteria for the site to be deleted I guess. Who decides that a particular site should be deleted? Siteadmin, superadmin, subscription ends...?

    2 + 3) Using two different levels in Prosites will let you differentiate. That is 'Level 1' don't have MarketPress, while 'Level 2' does. You then set up different 'Premium plugin' packages for the different levels.

    4) Not sure. Are sure you want to delete the data? The site could re-upgrade to gain access to their data again.

    Hope this helps :slight_smile:

    Cheers
    Mort3n

  • aecnu
    • WP Unicorn

    Greetings Arvind,

    Just touching base with you to see if Mort3n's suggestions have helped you achieve your goals and the pro-grammatically questions you are asking are so far beyond the scope of the support we provide here - teaching php and how to program to include what to program I am not even going to attempt to go there.

    Have a piece of code you are having an issue with that is related to WPMU DEV or WordPress? Throw it up here and I will see if I can get one of our coders to look at it or hire a coder to fix it and/or look it over for you, you could see if there's a developer available at wpmu jobs who could get onto it right this minute.

    Or am I miss interpreting this query and the question is really about how to work with Pro Sites?

    Please advise.

    Cheers, Joe

  • Arvind
    • Site Builder, Child of Zeus

    Hello Joe,

    I am not asking for programming/coding advice-- I am asking for the basic logic to accomplish what I want to do-- i.e. something like the algorithm, viz series of logical operations to be done, to accomplish the points I have raised above.

    Once I understand the logical operations I can then do the appropriate programming to do those operations.

    Yours sincerely,
    Arvind.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.