attempt automatically) before moving on."); require_once('../wp-config.php'); require('upgrade-functions.php'); $step = $HTTP_GET_VARS['step']; if (!$step) $step = 0; ?> WordPress › Installation

WordPress

hide_errors(); $installed = $wpdb->get_results("SELECT * FROM $tableusers"); if ($installed) die('

You appear to already have WordPress installed. If you would like to reinstall please clear your old database files first.

'); $wpdb->show_errors(); switch($step) { case 0: ?>

Welcome to WordPress. We’re now going to go through a few steps to get you up and running with the latest in personal publishing platforms. Before we get started, remember that we require a PHP version of at least 4.1.0, you have . Look good? You also need to set up the database connection information in wp-config.php. Have you looked at the readme? If you’re all ready, let's go!

Step 1

Okay first we’re going to set up the links database. This will allow you to host your own blogroll, complete with Weblogs.com updates.

Installing WP-Links.

Checking for tables...

\n"; } if (!$got_cats) { echo "

Can't find table '$tablelinkcategories', gonna create it...

\n"; $sql = "CREATE TABLE $tablelinkcategories ( " . " cat_id int(11) NOT NULL auto_increment, " . " cat_name tinytext NOT NULL, ". " auto_toggle enum ('Y','N') NOT NULL default 'N', ". " show_images enum ('Y','N') NOT NULL default 'Y', " . " show_description enum ('Y','N') NOT NULL default 'Y', " . " show_rating enum ('Y','N') NOT NULL default 'Y', " . " show_updated enum ('Y','N') NOT NULL default 'Y', " . " sort_order varchar(64) NOT NULL default 'name', " . " sort_desc enum('Y','N') NOT NULL default 'N', " . " text_before_link varchar(128) not null default '
  • ', " . " text_after_link varchar(128) not null default '
    '," . " text_after_all varchar(128) not null default '
  • ', " . " list_limit int not null default -1, " . " PRIMARY KEY (cat_id) ". ") "; $result = mysql_query($sql) or print ("Can't create the table '$tablelinkcategories' in the database.
    " . $sql . "
    " . mysql_error()); if ($result != false) { echo "

    Table '$tablelinkcategories' created OK

    \n"; $got_cats = true; } } else { echo "

    Found table '$tablelinkcategories', don't need to create it...

    \n"; $got_cats = true; } if (!$got_links) { echo "

    Can't find '$tablelinks', gonna create it...

    \n"; $sql = "CREATE TABLE $tablelinks ( " . " link_id int(11) NOT NULL auto_increment, " . " link_url varchar(255) NOT NULL default '', " . " link_name varchar(255) NOT NULL default '', " . " link_image varchar(255) NOT NULL default '', " . " link_target varchar(25) NOT NULL default '', " . " link_category int(11) NOT NULL default 0, " . " link_description varchar(255) NOT NULL default '', " . " link_visible enum ('Y','N') NOT NULL default 'Y', " . " link_owner int NOT NULL DEFAULT '1', " . " link_rating int NOT NULL DEFAULT '0', " . " link_updated DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', " . " link_rel varchar(255) NOT NULL default '', " . " link_notes MEDIUMTEXT NOT NULL default '', " . " PRIMARY KEY (link_id) " . ") "; $result = mysql_query($sql) or print ("Can't create the table '$tablelinks' in the database.
    " . $sql . "
    " . mysql_error()); $links = mysql_query("INSERT INTO $tablelinks VALUES ('', 'http://wordpress.org/', 'WordPress', '', '', 1, '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '');"); $links = mysql_query("INSERT INTO $tablelinks VALUES ('', 'http://photomatt.net/', 'Matt', '', '', 1, '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '');"); $links = mysql_query("INSERT INTO $tablelinks VALUES ('', 'http://zed1.com/journalized/', 'Mike', '', '', 1, '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '');"); $links = mysql_query("INSERT INTO $tablelinks VALUES ('', 'http://www.alexking.org/', 'Alex', '', '', 1, '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '');"); $links = mysql_query("INSERT INTO $tablelinks VALUES ('', 'http://dougal.gunters.org/', 'Dougal', '', '', 1, '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '');"); if ($result != false) { echo "

    Table '$tablelinks' created OK

    \n"; $got_links = true; } } else { echo "

    Found table '$tablelinks', don't need to create it...

    \n"; $got_links = true; } if ($got_links && $got_cats) { echo "

    Looking for category 1...

    \n"; $sql = "SELECT * FROM $tablelinkcategories WHERE cat_id=1 "; $result = mysql_query($sql) or print ("Can't query '$tablelinkcategories'.
    " . $sql . "
    " . mysql_error()); if ($result != false) { if ($row = mysql_fetch_object($result)) { echo "

    You have at least 1 category. Good!

    \n"; $got_row = true; } else { echo "

    Gonna insert category 1...

    \n"; $sql = "INSERT INTO $tablelinkcategories (cat_id, cat_name) VALUES (1, 'Links')"; $result = mysql_query($sql) or print ("Can't query insert category.
    " . $sql . "
    " . mysql_error()); if ($result != false) { echo "

    Inserted category Ok

    \n"; $got_row = true; } } } } if ($got_row) { echo "

    All done!

    \n"; } ?>

    Did you defeat the boss monster at the end? Great! You’re ready for Step 2.

    Step 2

    First we’re going to create the necessary blog tables in the database...

    query($query); ?>

    The first table has been created! ...

    query($query); ?>

    The test post has been inserted correctly...

    query($query); $query = "INSERT INTO $tablecategories (cat_ID, cat_name) VALUES ('0', 'General')"; $q = $wpdb->query($query); $query = "UPDATE $tableposts SET post_category = 1"; $result = $wpdb->query($query); ?>

    Categories are up and running...

    query($query); $now = date('Y-m-d H:i:s'); $now_gmt = gmdate('Y-m-d H:i:s'); $query = "INSERT INTO $tablecomments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content) VALUES ('1', 'Mr WordPress', 'mr@wordpress.org', 'http://wordpress.org', '127.0.0.1', '$now', '$now_gmt', 'Hi, this is a comment.
    To delete a comment, just log in, and view the posts\' comments, there you will have the option to edit or delete them.')"; $q = $wpdb->query($query); ?>

    Comments are groovy...

    query($query); ?>

    Post metadata table ready to go...

    query($query); // $query = "DROP TABLE IF EXISTS $tableoptiontypes"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tableoptiontypes\" in the database."); $query = " CREATE TABLE $tableoptiontypes ( optiontype_id int(11) NOT NULL auto_increment, optiontype_name varchar(64) NOT NULL, PRIMARY KEY (optiontype_id) ) "; $q = $wpdb->query($query); // $query = "DROP TABLE IF EXISTS $tableoptiongroups"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tableoptiongroups\" in the database."); $query = " CREATE TABLE $tableoptiongroups ( group_id int(11) NOT NULL auto_increment, group_name varchar(64) not null, group_desc varchar(255), group_longdesc tinytext, PRIMARY KEY (group_id) ) "; $q = $wpdb->query($query); // $query = "DROP TABLE IF EXISTS $tableoptiongroup_options"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tableoptiongroup_options\" in the database."); $query = " CREATE TABLE $tableoptiongroup_options ( group_id int(11) NOT NULL, option_id int(11) NOT NULL, seq int(11) NOT NULL, PRIMARY KEY (group_id, option_id) ) "; $q = $wpdb->query($query); // $query = "DROP TABLE IF EXISTS $tableoptionvalues"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tableoptionvalues\" in the database."); $query = " CREATE TABLE $tableoptionvalues ( option_id int(11) NOT NULL, optionvalue tinytext, optionvalue_desc varchar(255), optionvalue_max int(11), optionvalue_min int(11), optionvalue_seq int(11), UNIQUE (option_id, optionvalue(255)), INDEX (option_id, optionvalue_seq) ) "; $q = $wpdb->query($query); ?>

    Option Tables created okay.

    list of possible charsets)', 8)", // general blog setup "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(9 ,'start_of_week', 5, '1', 'day at the start of the week', 8, 20)", //"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(10,'use_preview', 2, '1', 'Do you want to use the \'preview\' function', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(11,'use_bbcode', 2, '0', 'use BBCode, like [b]bold[/b]', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(12,'use_gmcode', 2, '0', 'use GreyMatter-styles: **bold** \\\\italic\\\\ __underline__', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(13,'use_quicktags', 2, '1', 'buttons for HTML tags (they won\'t work on IE Mac yet)', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(14,'use_htmltrans', 2, '1', 'IMPORTANT! set this to false if you are using Chinese, Japanese, Korean, or other double-bytes languages', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(15,'use_balanceTags', 2, '1', 'this could help balance your HTML code. if it gives bad results, set it to false', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(16,'use_smilies', 2, '1', 'set this to 1 to enable smiley conversion in posts (note: this makes smiley conversion in ALL posts)', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(17,'smilies_directory', 3, 'http://example.com/wp-images/smilies', 'the directory where your smilies are (no trailing slash)', 8, 40)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(18,'require_name_email', 2, '0', 'set this to true to require e-mail and name, or false to allow comments without e-mail/name', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(20,'comments_notify', 2, '1', 'set this to true to let every author be notified about comments on their posts', 8, 20)", //rss/rdf feeds "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(21,'posts_per_rss', 1, '10', 'number of last posts to syndicate', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(22,'rss_language', 3, 'en', 'the language of your blog ( see this: http://backend.userland.com/stories/storyReader$16 )', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(23,'rss_encoded_html', 2, '0', 'for b2rss.php: allow encoded HTML in <description> tag?', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(24,'rss_excerpt_length', 1, '50', 'length (in words) of excerpts in the RSS feed? 0=unlimited note: in b2rss.php, this will be set to 0 if you use encoded HTML', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(25,'rss_use_excerpt', 2, '1', 'use the excerpt field for rss feed.', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(26,'use_weblogsping', 2, '0', 'set this to true if you want your site to be listed on http://weblogs.com when you add a new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(27,'use_blodotgsping', 2, '0', 'set this to true if you want your site to be listed on http://blo.gs when you add a new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(29,'use_trackback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be trackback\'able or not note: setting it to zero would also disable sending trackbacks', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(30,'use_pingback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be pingback\'able or not note: setting it to zero would also disable sending pingbacks', 8, 20)", //file upload "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(31,'use_fileupload', 2, '0', 'set this to false to disable file upload, or true to enable it', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(32,'fileupload_realpath', 3, '/home/your/site/wordpress/images', 'enter the real path of the directory where you\'ll upload the pictures \nif you\'re unsure about what your real path is, please ask your host\'s support staff \nnote that the directory must be writable by the webserver (chmod 766) \nnote for windows-servers users: use forwardslashes instead of backslashes', 8, 40)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(33,'fileupload_url', 3, 'http://example.com/images', 'enter the URL of that directory (it\'s used to generate the links to the uploded files)', 8, 40)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(34,'fileupload_allowedtypes', 3, 'jpg gif png', 'accepted file types, separated by spaces. example: \'jpg gif png\'', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(35,'fileupload_maxk', 1, '96', 'by default, most servers limit the size of uploads to 2048 KB, if you want to set it to a lower value, here it is (you cannot set a higher value than your server limit)', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(36,'fileupload_minlevel', 1, '1', 'you may not want all users to upload pictures/files, so you can set a minimum level for this', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(37,'fileupload_allowedusers', 3, '', '...or you may authorize only some users. enter their logins here, separated by spaces. if you leave this variable blank, all users who have the minimum level are authorized to upload. example: \'barbara anne george\'', 8, 30)", // email settings "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(38,'mailserver_url', 3, 'mail.example.com', 'mailserver settings', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(39,'mailserver_login', 3, 'login@example.com', 'mailserver settings', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(40,'mailserver_pass', 3, 'password', 'mailserver settings', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(41,'mailserver_port', 1, '110', 'mailserver settings', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(42,'default_category', 1, '1', 'by default posts will have this category', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(43,'subjectprefix', 3, 'blog:', 'subject prefix', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(44,'bodyterminator', 3, '___', 'body terminator string (starting from this string, everything will be ignored, including this string)', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(46,'use_phoneemail', 2, '0', 'some mobile phone email services will send identical subject & content on the same line if you use such a service, set use_phoneemail to true, and indicate a separator string', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(47,'phoneemail_separator', 3, ':::', 'when you compose your message, you\'ll type your subject then the separator string then you type your login:password, then the separator, then content', 8, 20)", // original options from options page "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(48,'posts_per_page', 1, '20','How many posts/days to show on the index page.', 4, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(49,'what_to_show', 5, 'posts','Posts, days, or posts paged', 4, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(50,'archive_mode', 5, 'monthly','Which \'unit\' to use for archives.', 4, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(51,'time_difference', 6, '0', 'if you\'re not on the timezone of your server', 4, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(52,'date_format', 3, 'n/j/Y', 'see note for format characters', 4, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(53,'time_format', 3, 'g:i a', 'see note for format characters', 4, 20)", //'pages' of options "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(1, 'Other Options', 'Posts per page etc. Original options page')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(1,48,1 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(1,49,2 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(1,50,3 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(1,51,4 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(1,52,5 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(1,53,6 )", "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(2, 'General blog settings', 'Things you\'ll probably want to tweak')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,9 ,1 )", //"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,10,2 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,11,3 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,12,4 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,13,5 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,14,6 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,15,7 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,16,8 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,17,9 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,18,10)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,19,11)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(2,20,12)", "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(3, 'RSS/RDF Feeds, Track/Ping-backs', 'Settings for RSS/RDF Feeds, Track/ping-backs')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,21,1 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,22,2 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,23,3 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,24,4 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,25,5 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,26,6 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,27,7 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,28,8 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,29,9 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(3,30,10)", "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(4, 'File uploads', 'Settings for file uploads')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(4,31,1 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(4,32,2 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(4,33,3 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(4,34,4 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(4,35,5 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(4,36,6 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(4,37,7 )", "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(5, 'Blog-by-Email settings', 'Settings for blogging via email')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,38,1 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,39,2 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,40,3 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,41,4 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,42,5 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,43,6 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,44,7 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,45,8 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,46,9 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(5,47,10)", "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(6, 'Base settings', 'Basic settings required to get your blog working')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,1,1)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,2,2)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,3,3)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,4,4)", //"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,6,5)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,7,6)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,8,7)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(6,54,8)", // select data for what to show "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (49, 'days', 'days', null,null,1)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (49, 'posts', 'posts', null,null,2)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (49, 'paged', 'posts paged', null,null,3)", // select data for archive mode "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'daily', 'daily', null,null,1)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'weekly', 'weekly', null,null,2)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'monthly', 'monthly', null,null,3)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (50, 'postbypost','post by post',null,null,4)", // select data for time diff "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (51, 'hours', 'hours', 23, -23, null)", // select data for start of week "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '0', 'Sunday', null,null,1)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '1', 'Monday', null,null,2)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (9, '6', 'Saturday', null,null,3)", // Add in a new page for POST DEFAULTS // default_post_status select one of publish draft private // default_comment_status select one of open closed // default_ping_status select one of open closed // default_pingback_flag select one of checked unchecked // default_post_category sql_select "SELECT cat_id AS value, cat_name AS label FROM $tablecategories order by cat_name" "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(55,'default_post_status', 5, 'publish', 'The default state of each new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(56,'default_comment_status', 5, 'open', 'The default state of comments for each new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(57,'default_ping_status', 5, 'open', 'The default ping state for each new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(58,'default_pingback_flag', 5, '1', 'Whether the \'PingBack the URLs in this post\' checkbox should be checked by default', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(59,'default_post_category', 7, '1', 'The default category for each new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(83,'default_post_edit_rows', 1, '9', 'The number of rows in the edit post form (min 3, max 100)', 8, 5)", "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(7, 'Default post options', 'Default settings for new posts.')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(7,55,1 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(7,56,2 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(7,57,3 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(7,58,4 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(7,59,5 )", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(7,83,5 )", // select data for post_status "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'publish', 'Publish', null,null,1)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'draft', 'Draft', null,null,2)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (55, 'private', 'Private', null,null,3)", // select data for comment_status "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (56, 'open', 'Open', null,null,1)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (56, 'closed', 'Closed', null,null,2)", // select data for ping_status (aargh duplication!) "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (57, 'open', 'Open', null,null,1)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (57, 'closed', 'Closed', null,null,2)", // select data for pingback flag "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (58, '1', 'Checked', null,null,1)", "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (58, '0', 'Unchecked', null,null,2)", // sql select data for default "INSERT INTO $tableoptionvalues (option_id, optionvalue, optionvalue_desc, optionvalue_max, optionvalue_min, optionvalue_seq) VALUES (59, 'SELECT cat_id AS value, cat_name AS label FROM $tablecategories order by cat_name', '', null,null,1)", ); foreach ($option_data as $query) { $q = $wpdb->query($query); } ?>

    Option Data inserted okay.

    query($query); } ?>

    Links option data inserted okay.

    see here', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(87,'default_geourl_lon', 8, 0.0, 'The default Longitude ICBM value', 8, 20)", "INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(9,'Geo Options', 'Settings which control the posting and display of Geo Options')", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,84,1)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,85,1)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,86,1)", "INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,87,1)", ); foreach ($geo_option_data as $query) { $q = $wpdb->query($query); } ?>

    Geo option data inserted okay.

    OK. We're nearly done now. We just need to ask you a couple of things:

    What is the URL for your blog?

    On to

    Step 3

    query($query); $query= "UPDATE $tableoptions set option_value='$url/wp-images/smilies' where option_id=17"; //smilies_directory $q = $wpdb->query($query); } // $query = "DROP TABLE IF EXISTS $tableusers"; // $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tableusers\" in the database."); $query = " CREATE TABLE $tableusers ( ID int(10) unsigned NOT NULL auto_increment, user_login varchar(20) NOT NULL default '', user_pass varchar(64) NOT NULL default '', user_firstname varchar(50) NOT NULL default '', user_lastname varchar(50) NOT NULL default '', user_nickname varchar(50) NOT NULL default '', user_icq int(10) unsigned NOT NULL default '0', user_email varchar(100) NOT NULL default '', user_url varchar(100) NOT NULL default '', user_ip varchar(15) NOT NULL default '', user_domain varchar(200) NOT NULL default '', user_browser varchar(200) NOT NULL default '', dateYMDhour datetime NOT NULL default '0000-00-00 00:00:00', user_level int(2) unsigned NOT NULL default '0', user_aim varchar(50) NOT NULL default '', user_msn varchar(100) NOT NULL default '', user_yim varchar(50) NOT NULL default '', user_idmode varchar(20) NOT NULL default '', PRIMARY KEY (ID), UNIQUE KEY (user_login) ) "; $q = $wpdb->query($query); $random_password = substr(md5(uniqid(microtime())),0,6); $query = "INSERT INTO $tableusers (ID, user_login, user_pass, user_firstname, user_lastname, user_nickname, user_icq, user_email, user_url, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_aim, user_msn, user_yim, user_idmode) VALUES ( '1', 'admin', MD5('$random_password'), '', '', 'admin', '0', '$admin_email', '', '127.0.0.1', '127.0.0.1', '', '00-00-0000 00:00:01', '10', '', '', '', 'nickname')"; $q = $wpdb->query($query); // Do final updates upgrade_all(); ?>

    User setup successful!

    Now you can log in with the login "admin" and password "".

    Note that password carefully! It is a random password that was generated just for you. If you lose it, you will have to delete the tables from the database yourself, and re-install WordPress.

    Were you expecting more steps? Sorry to disappoint. All done!