如何使用SQL数据库修改WordPress文章ID?
有些站长想要修改WordPress网站文章ID,今天简单讲一下通过sql设置WordPress文章id,那么如…
Warning: Attempt to read property "post_type" on null in /www/wwwroot/wper.net/wp-content/plugins/wper-meta.php on line 305
有些站长想要修改WordPress网站文章ID,今天简单讲一下通过sql设置WordPress文章id,那么如何使用SQL数据库修改WordPress文章ID?
进入 mysql 命令或者 phpmyadmin 的 SQL,执行如下命令即可:如将文章ID为3368的文章修改为189。
update wp_posts set id = 3368 where id = 189;<br>
update wp_term_relationshi<a href=”/fw/photo.html” target=”_blank”>ps</a> set object_id = 3368 where object_id = 189;<br>
update wp_postmeta set post_id = 3368 where post_id = 189;<br>
update wp_comments set comment_post_ID = 3368 where comment_post_ID = 189;
如果是主题使用的是虚拟主机,可以使用以下代码:
UPDATE `wp_posts` SET `ID` = ‘189’,`guid` = <a href=”http://www.wpmee.com”>www.wpmee.com</a> 189′ WHERE `wp_posts`.`ID` =3368;<br>
UPDATE `wp_term_relationships` SET `object_id` = ‘189’ WHERE `wp_term_relationships`.`object_id` =3368;<br>
UPDATE `wp_postmeta` SET `post_id` = ‘189’ WHERE `wp_postmeta`.`post_id` =3368;<br>
UPDATE `wp_postmeta` SET `post_id` = ‘189’ WHERE `wp_postmeta`.`post_id` = 3368;<br>
UPDATE `wp_comments` SET `comment_post_ID` = ‘189’ WHERE `wp_comments`.`comment_post_ID` = 3368;
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!