Title: Create wordpress pages using SQL only
Last modified: August 22, 2016

---

# Create wordpress pages using SQL only

 *  Resolved [Sub_Zero](https://wordpress.org/support/users/sub_zero/)
 * (@sub_zero)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/create-wordpress-pages-using-sql-only/)
 * Hi,
 * I have some data on my Typo3 database and I want to import it to my wordpress
   custom post type. It should be the content of the CPT. Since there are more than
   500 pages, I don’t want to create them manually. So is there a way I could create
   these pages using SQL only? Like create me 500 posts into the custom post type
   and take the xy row as their content?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/create-wordpress-pages-using-sql-only/#post-5244228)
 * There is, but it’s not as easy as adding the data to a single table. WordPress
   stores post/page/etc data in `wp_posts` and `wp_postmeta` so you’ll need to look
   at both of those.
 * The easy way to do it is to use the standard WordPress functions like `wp_insert_post()`
   and `add_post_meta()` so that you know that everything is stored the right way
   with the right database keys and references. It’s not hard to write a small script
   that can do that.
 *  Thread Starter [Sub_Zero](https://wordpress.org/support/users/sub_zero/)
 * (@sub_zero)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/create-wordpress-pages-using-sql-only/#post-5244231)
 * This helps me a lot. I didn’t know about these functions. Thank you so much!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Create wordpress pages using SQL only’ is closed to new replies.

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Sub_Zero](https://wordpress.org/support/users/sub_zero/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/create-wordpress-pages-using-sql-only/#post-5244231)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
