PHP 8.1.33
Preview: network.php Size: 5.39 KB
/home/jambtst2015/public_html/greymouthconsulting.com/wp-admin/network.php

<?php
/**
 * Network installation administration panel.
 *
 * A multi-step process allowing the user to enable a network of WordPress sites.
 *
 * @since 3.0.0
 *
 * @package WordPress
 * @subpackage Administration
 */

define( 'WP_INSTALLING_NETWORK', true );

/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';

if ( ! current_user_can( 'setup_network' ) ) {
	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
}

if ( is_multisite() ) {
	if ( ! is_network_admin() ) {
		wp_redirect( network_admin_url( 'setup.php' ) );
		exit;
	}

	if ( ! defined( 'MULTISITE' ) ) {
		wp_die( __( 'The Network creation panel is not for WordPress MU networks.' ) );
	}
}

require_once __DIR__ . '/includes/network.php';

// We need to create references to ms global tables to enable Network.
foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) {
	$wpdb->$table = $prefixed_table;
}

if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) {
	wp_die(
		printf(
			/* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */
			__( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ),
			'<code>WP_ALLOW_MULTISITE</code>',
			'<code>wp-config.php</code>'
		)
	);
}

if ( is_network_admin() ) {
	// Used in the HTML title tag.
	$title       = __( 'Network Setup' );
	$parent_file = 'settings.php';
} else {
	// Used in the HTML title tag.
	$title       = __( 'Create a Network of WordPress Sites' );
	$parent_file = 'tools.php';
}

$network_help = '<p>' . __( 'This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.' ) . '</p>' .
	'<p>' . __( 'Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your installation. Fill out the network details, and click Install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).' ) . '</p>' .
	'<p>' . __( 'The next screen for Network Setup will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.' ) . '</p>' .
	'<p>' . __( 'Add the designated lines of code to wp-config.php (just before <code>/*...stop editing...*/</code>) and <code>.htaccess</code> (replacing the existing WordPress rules).' ) . '</p>' .
	'<p>' . __( 'Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.' ) . '</p>' .
	'<p>' . __( 'The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with &#8220;/blog/&#8221; from the main site. This disabling will be addressed in a future version.' ) . '</p>' .
	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
	'<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/create-network/">Documentation on Creating a Network</a>' ) . '</p>' .
	'<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-network-screen/">Documentation on the Network Screen</a>' ) . '</p>';

get_current_screen()->add_help_tab(
	array(
		'id'      => 'network',
		'title'   => __( 'Network' ),
		'content' => $network_help,
	)
);

get_current_screen()->set_help_sidebar(
	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
	'<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/create-network/">Documentation on Creating a Network</a>' ) . '</p>' .
	'<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-network-screen/">Documentation on the Network Screen</a>' ) . '</p>' .
	'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);

require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>

<?php
if ( $_POST ) {

	check_admin_referer( 'install-network-1' );

	require_once ABSPATH . 'wp-admin/includes/upgrade.php';
	// Create network tables.
	install_network();
	$base              = parse_url( trailingslashit( get_option( 'home' ) ), PHP_URL_PATH );
	$subdomain_install = allow_subdomain_install() ? ! empty( $_POST['subdomain_install'] ) : false;
	if ( ! network_domain_check() ) {
		$result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), wp_unslash( $_POST['sitename'] ), $base, $subdomain_install );
		if ( is_wp_error( $result ) ) {
			if ( 1 === count( $result->get_error_codes() ) && 'no_wildcard_dns' === $result->get_error_code() ) {
				network_step2( $result );
			} else {
				network_step1( $result );
			}
		} else {
			network_step2();
		}
	} else {
		network_step2();
	}
} elseif ( is_multisite() || network_domain_check() ) {
	network_step2();
} else {
	network_step1();
}
?>
</div>

<?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>

Directory Contents

Dirs: 7 × Files: 96

Name Size Perms Modified Actions
css DIR
- drwxr-xr-x 2024-11-22 17:53:04
Edit Download
images DIR
- drwxr-xr-x 2024-11-28 06:54:10
Edit Download
includes DIR
- drwxr-xr-x 2024-11-22 17:53:04
Edit Download
js DIR
- drwxr-xr-x 2025-10-13 16:02:54
Edit Download
maint DIR
- drwxr-xr-x 2024-11-22 17:53:04
Edit Download
network DIR
- drwxr-xr-x 2025-10-11 02:25:15
Edit Download
user DIR
- drwxr-xr-x 2025-10-13 16:02:54
Edit Download
81 B lrw-r--r-- 2024-11-28 06:54:09
Edit Download
65.88 KB lrw-r--r-- 2023-07-29 06:54:09
Edit Download
19.64 KB lrw-r--r-- 2025-09-30 21:30:38
Edit Download
5.03 KB lrw-r--r-- 2024-07-04 15:22:14
Edit Download
2.77 KB lrw-r--r-- 2024-09-26 19:41:14
Edit Download
479 B lrw-r--r-- 2025-01-22 19:06:22
Edit Download
9.12 KB lrw-r--r-- 2025-01-24 15:58:24
Edit Download
1.97 KB lrw-r--r-- 2025-01-16 21:18:24
Edit Download
12.30 KB lrw-r--r-- 2025-01-16 21:18:24
Edit Download
4.87 KB lrw-r--r-- 2025-03-16 20:11:24
Edit Download
10.09 KB lrw-r--r-- 2023-09-14 04:54:20
Edit Download
11.35 KB lrw-r--r-- 2024-05-01 22:01:12
Edit Download
5.59 KB lrw-r--r-- 2024-02-27 04:51:12
Edit Download
4.11 KB lrw-r--r-- 2024-12-22 04:16:24
Edit Download
489 B lrw-r--r-- 2025-01-22 19:06:22
Edit Download
499 B lrw-r--r-- 2025-01-22 19:06:22
Edit Download
10.91 KB lrw-r--r-- 2025-03-06 20:01:24
Edit Download
14.38 KB lrw-r--r-- 2023-09-17 19:33:18
Edit Download
28.83 KB lrw-r--r-- 2025-03-19 00:09:26
Edit Download
14.37 KB lrw-r--r-- 2025-03-10 14:34:22
Edit Download
8.34 KB lrw-r--r-- 2024-11-12 01:43:20
Edit Download
6.21 KB lrw-r--r-- 2025-02-08 16:44:24
Edit Download
10.44 KB lrw-r--r-- 2024-12-06 22:07:22
Edit Download
22.00 KB lrw-r--r-- 2025-01-29 22:40:22
Edit Download
19.48 KB lrw-r--r-- 2024-10-04 02:46:16
Edit Download
7.33 KB lrw-r--r-- 2024-04-18 00:21:16
Edit Download
6.64 KB lrw-r--r-- 2025-11-03 04:02:41
Edit Download
7.75 KB lrw-r--r-- 2024-04-18 00:21:16
Edit Download
11.02 KB lrw-r--r-- 2024-05-27 00:51:14
Edit Download
4.54 KB lrw-r--r-- 2025-01-21 03:04:28
Edit Download
7.58 KB lrw-r--r-- 2025-02-25 23:34:16
Edit Download
7.68 KB lrw-r--r-- 2023-09-14 04:54:20
Edit Download
6.80 KB lrw-r--r-- 2022-11-20 19:10:16
Edit Download
17.94 KB lrw-r--r-- 2025-02-11 16:14:22
Edit Download
934 B lrw-r--r-- 2025-02-08 16:44:24
Edit Download
4.26 KB lrw-r--r-- 2025-02-08 16:44:24
Edit Download
2.63 KB lrw-r--r-- 2024-06-14 00:50:14
Edit Download
2.89 KB lrw-r--r-- 2024-05-01 22:01:12
Edit Download
2.02 KB lrw-r--r-- 2024-08-26 03:48:14
Edit Download
2.92 KB lrw-r--r-- 2024-11-04 20:51:18
Edit Download
3.18 KB lrw-r--r-- 2023-02-23 15:38:22
Edit Download
3.58 KB lrw-r--r-- 2025-02-08 20:53:18
Edit Download
819 B lrw-r--r-- 2024-05-01 22:01:12
Edit Download
9.82 KB lrw-r--r-- 2025-02-21 02:29:22
Edit Download
16.97 KB lrw-r--r-- 2025-03-03 22:22:26
Edit Download
307 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
196 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
4.19 KB lrw-r--r-- 2024-09-03 22:19:14
Edit Download
216 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
229 B lrw-r--r-- 2024-06-22 15:47:16
Edit Download
215 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
217 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
219 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
215 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
4.74 KB lrw-r--r-- 2023-09-05 23:26:26
Edit Download
48.26 KB lrw-r--r-- 2025-03-19 01:48:26
Edit Download
5.39 KB lrw-r--r-- 2024-03-09 03:38:08
Edit Download
15.40 KB lrw-r--r-- 2025-01-13 19:57:24
Edit Download
21.58 KB lrw-r--r-- 2025-02-11 20:57:22
Edit Download
621 B lrw-r--r-- 2025-01-22 19:06:22
Edit Download
6.35 KB lrw-r--r-- 2025-01-13 19:57:24
Edit Download
21.21 KB lrw-r--r-- 2024-03-09 03:38:08
Edit Download
9.95 KB lrw-r--r-- 2025-01-21 03:04:28
Edit Download
10.03 KB lrw-r--r-- 2024-05-14 22:05:12
Edit Download
9.10 KB lrw-r--r-- 2024-03-09 03:38:08
Edit Download
13.45 KB lrw-r--r-- 2024-09-02 04:13:16
Edit Download
13.66 KB lrw-r--r-- 2025-02-28 04:04:28
Edit Download
6.96 KB lrw-r--r-- 2024-02-20 12:27:06
Edit Download
30.00 KB lrw-r--r-- 2025-02-08 16:44:24
Edit Download
2.70 KB lrw-r--r-- 2024-06-15 16:34:14
Edit Download
9.97 KB lrw-r--r-- 2024-06-15 16:34:14
Edit Download
2.34 KB lrw-r--r-- 2024-02-27 01:35:08
Edit Download
3.67 KB lrw-r--r-- 2023-11-22 22:44:24
Edit Download
2.52 KB lrw-r--r-- 2025-01-21 03:04:28
Edit Download
283 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
5.71 KB lrw-r--r-- 2024-05-01 22:01:12
Edit Download
17.48 KB lrw-r--r-- 2025-01-13 19:57:24
Edit Download
11.83 KB lrw-r--r-- 2025-04-08 02:15:30
Edit Download
3.99 KB lrw-r--r-- 2025-02-22 17:12:20
Edit Download
10.20 KB lrw-r--r-- 2024-05-01 22:01:12
Edit Download
2.20 KB lrw-r--r-- 2022-06-01 22:14:10
Edit Download
15.59 KB lrw-r--r-- 2025-02-28 04:04:28
Edit Download
23.37 KB lrw-r--r-- 2025-02-08 16:44:24
Edit Download
48.12 KB lrw-r--r-- 2025-03-10 22:16:28
Edit Download
3.43 KB lrw-r--r-- 2023-02-23 15:38:22
Edit Download
45.43 KB lrw-r--r-- 2024-10-03 04:25:16
Edit Download
12.79 KB lrw-r--r-- 2024-01-30 19:23:12
Edit Download
341 B lrw-r--r-- 2020-02-06 11:33:12
Edit Download
6.33 KB lrw-r--r-- 2025-02-11 16:14:22
Edit Download
14.84 KB lrw-r--r-- 2025-02-08 16:44:24
Edit Download
39.79 KB lrw-r--r-- 2025-03-13 14:04:34
Edit Download
24.05 KB lrw-r--r-- 2025-03-03 04:35:24
Edit Download
23.28 KB lrw-r--r-- 2025-02-08 20:53:18
Edit Download
4.97 KB lrw-r--r-- 2024-10-15 12:52:18
Edit Download
19.17 KB lrw-r--r-- 2024-01-16 22:31:14
Edit Download
1.09 KB lrw-r--r-- 2022-03-22 23:59:04
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).