WordPress 修改用户ID

2021-7-30 lijiayan

将下面的代码添加到当前主题函数模板 functions.php 中:

  1. global $wpdb;
  2. $wpdb->query("UPDATE wp_users SET ID = 1 WHERE ID = 2");
  3. $wpdb->query("UPDATE wp_usermeta SET user_id = 1 WHERE user_id = 2");
  4. $wpdb->query("UPDATE wp_posts SET post_author = 1 WHERE post_author = 2");
  5. $wpdb->query("UPDATE wp_comments SE...

阅读全文>>

标签: wordpress

评论(0) 浏览(141)

Powered by emlog 滇ICP备11006562号 sitemap