Core_Command::multisite_convert PHP Method

multisite_convert() public method

Creates the multisite database tables, and adds the multisite constants to wp-config.php. For those using WordPress with Apache, remember to update the .htaccess file with the appropriate multisite rewrite rules. ## OPTIONS [--title=] : The title of the new network. [--base=] : Base path after the domain name that each site url will start with. --- default: / --- [--subdomains] : If passed, the network will use subdomains, instead of subdirectories. Doesn't work with 'localhost'. ## EXAMPLES $ wp core multisite-convert Set up multisite database tables. Added multisite constants to wp-config.php. Success: Network installed. Don't forget to set up rewrite rules.
public multisite_convert ( $args, $assoc_args )
    public function multisite_convert($args, $assoc_args)
    {
        if (is_multisite()) {
            WP_CLI::error('This already is a multisite install.');
        }
        $assoc_args = self::_set_multisite_defaults($assoc_args);
        if (!isset($assoc_args['title'])) {
            $assoc_args['title'] = sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
        }
        if ($this->_multisite_convert($assoc_args)) {
            WP_CLI::success("Network installed. Don't forget to set up rewrite rules.");
        }
    }