view cart | home | contact us | 619.501.2466
HACKER SAFE certified sites prevent over 99.9% of hacker crime.

wp: convert post to page

November 20th, 2007

http://netthink.com/archives/113

In my blog I’ve accumulated only three types of posts.

mysql> select distinct post_type from wp_posts;
+------------+
| post_type  |
+------------+
| attachment |
| page       |
| post       |
+------------+

As a point of curiosity, the post_status field is an enumerated type and can be set into the future if you want to delay the publication of a post.

post_status  enum('publish', 'draft', 'private', 'static', 'object', 'attachment', 'inherit', 'future')

To change any given post to a page, you simply change the post_type field from “post” to “page”.

First, identify the post identification number. This can be done by looking at the URL in your browser when viewing the page. For example, in the URL

http://localhost/?p=5

the post ID is 5.

Then log into mysql and make the update.

mysql> update wp_posts set post_type=”page” where ID=5;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

You’re done. Post is now a Page. Check it out.

Posted in WordPress |


Comments Temproarily Disabled

We're working on it, check back soon!
© 2008 ca-cycleworks.com home   shop our catalog   news & blog   policies   privacy   contact