2 define('WP_INSTALLING', true);
4 require_once('../wp-load.php');
5 require_once('./includes/upgrade.php');
7 if (isset($_GET['step']))
11 function display_header(){
12 header( 'Content-Type: text/html; charset=utf-8' );
14 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
15 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
17 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
18 <title><?php _e('WordPress › Installation'); ?></title>
19 <?php wp_admin_css( 'install', true ); ?>
22 <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
25 }//end function display_header();
27 // Let's check to make sure WP isn't already installed.
28 if ( is_blog_installed() ) {display_header(); die('<h1>'.__('Already Installed').'</h1><p>'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'</p></body></html>');}
32 case 1: // in case people are directly linking to this
35 <h1><?php _e('Welcome'); ?></h1>
36 <p><?php printf(__('Welcome to the famous five minute WordPress installation process! You may want to browse the <a href="%s">ReadMe documentation</a> at your leisure. Otherwise, just fill in the information below and you\'ll be on your way to using the most extendable and powerful personal publishing platform in the world.'), '../readme.html'); ?></p>
37 <!--<h2 class="step"><a href="install.php?step=1"><?php _e('First Step'); ?></a></h2>-->
39 <h1><?php _e('Information needed'); ?></h1>
40 <p><?php _e("Please provide the following information. Don't worry, you can always change these settings later."); ?></p>
42 <form id="setup" method="post" action="install.php?step=2">
43 <table class="form-table">
45 <th scope="row"><label for="weblog_title"><?php _e('Blog Title'); ?></label></th>
46 <td><input name="weblog_title" type="text" id="weblog_title" size="25" /></td>
49 <th scope="row"><label for="admin_email"><?php _e('Your E-mail'); ?></label></th>
50 <td><input name="admin_email" type="text" id="admin_email" size="25" /><br />
51 <?php _e('Double-check your email address before continuing.'); ?>
54 <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
57 <p class="step"><input type="submit" name="Submit" value="<?php _e('Install WordPress'); ?>" class="button" /></p>
63 if ( !empty($wpdb->error) )
64 wp_die($wpdb->error->get_error_message());
67 // Fill in the data we gathered
68 $weblog_title = stripslashes($_POST['weblog_title']);
69 $admin_email = stripslashes($_POST['admin_email']);
70 $public = (int) $_POST['blog_public'];
71 // check e-mail address
72 if (empty($admin_email)) {
74 die('<p>'.__("<strong>ERROR</strong>: you must provide an e-mail address.").'</p>');
75 } else if (!is_email($admin_email)) {
77 die('<p>'.__('<strong>ERROR</strong>: that isn’t a valid e-mail address. E-mail addresses look like: <code>username@example.com</code>').'</p>');
81 $result = wp_install($weblog_title, 'admin', $admin_email, $public);
82 extract($result, EXTR_SKIP);
85 <h1><?php _e('Success!'); ?></h1>
87 <p><?php printf(__('WordPress has been installed. Were you expecting more steps? Sorry to disappoint.'), ''); ?></p>
89 <table class="form-table">
91 <th><?php _e('Username'); ?></th>
92 <td><code>admin</code></td>
95 <th><?php _e('Password'); ?></th>
96 <td><code><?php echo $password; ?></code><br />
97 <?php echo '<p>'.__('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.').'</p>'; ?></td>
101 <p class="step"><a href="../wp-login.php" class="button"><?php _e('Log In'); ?></a></p>
107 <script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>