Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('WP_USE_THEMES', false);
- require('./wp-config.php');
- $old_prefix = 'wp_';
- global $wpdb;
- $wpdb->query( "UPDATE `$wpdb->usermeta`
- SET `meta_key` = REPLACE( `meta_key` , '$old_prefix', '$wpdb->prefix' )
- WHERE `meta_key` LIKE '" . addcslashes( $old_prefix, '_' ) . "%'" );
- $wpdb->query( "UPDATE `$wpdb->options`
- SET `option_name` = '{$wpdb->prefix}user_roles'
- WHERE `option_name` = '{$old_prefix}user_roles' AND `blog_id` = 0" );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement