create multisite programmatically

Hi all,

this is my first post on this great community. I have to create a community based on buddypress for a casting company, but before this, I have to transform hundreds of personal pages (one page for each actor/model) based on a java custom web application into a multisite wordpress, where each actor/model can have one blog page.

So, for example, this personal site of a famous italian actor:
[EDIT: Link removed at user request]

will be a blog based on wordpress multisite. Because, we have thousands of personal site, I'd like to do it programmatically. What do I mean? I'd like to get some necessary data from a mysql db (like the username, pwd and sitename), and create, using some WP API, the relative sites on wordpress multisite.

Any hints? any suggestions?

Thanks in advance,
emiliano

  • Mason
    • DEV MAN’s Sidekick

    Hiya emiliano,

    First off, welcome to WPMU DEV!

    If you can export the information from the old system, I'd use our Batch create to create your new usernames, passwords, and separate blog accounts:
    https://premium.wpmudev.org/project/batch-create

    Importing the separate content will be more difficult. I'm not sure what the easiest way would be to import the rest of the information though. If you're looking to make each site have the same basic information inside a theme, you could use our New Blog Templates plugin as well:
    https://premium.wpmudev.org/project/new-blog-template

    Anybody have another suggestion for emiliano?

    Thanks!

  • Emiliano
    • WPMU DEV Initiate

    ohhh thanks! Great! So I'm missing just the final link... I mean...

    1) I can export all data from old system into a csv file
    2) I can create all accounts (username, pwd, blog) following your first link (good!!)
    3) I can create all blogs based on a template following your second link (good!!)
    4) This template could have a plugin developed by myself that takes data from a remote DB to display all the stuff, based on the username (photo, video, and so on for each actor/model)

    1st) question: 2) and 3) points do work together? I mean, is batch-create plugin able to create new blogs based on new-blog-template?
    2nd) question: does my 4th point make sense?

    Thanks again!!
    emiliano

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.