WordPress

This file seeks to upgrade you to the latest version of WordPress. If you are upgrading from any version other than .72, you should run the previous upgrade files to get everything up to date before running this.

If you’re all ready, let's go!

Step 1

If it isn’t there already, let’s add a field new to this version.

hide_errors(); $wpdb->query("ALTER TABLE `$tableposts` ADD INDEX (`post_name`)"); $wpdb->show_errors(); ?>

Done.

Now let's populate the new field.

Working get_results("SELECT ID, post_title, post_name FROM $tableposts"); foreach($posts as $post) { if ('' == $post->post_name) { $newtitle = sanitize_title($post->post_title); $wpdb->query("UPDATE $tableposts SET post_name = '$newtitle' WHERE ID = $post->ID"); } echo ' .'; flush(); } $wpdb->query("INSERT INTO `$tableoptions` (`option_id`, `blog_id`, `option_name`, `option_can_override`, `option_type`, `option_value`, `option_width`, `option_height`, `option_description`, `option_admin_level`) VALUES ('', '0', 'permalink_structure', 'Y', '3', '', '20', '8', 'How the permalinks for your site are constructed.', '8');"); ?> Done.

See, that didn’t hurt a bit. All done!