Title: Create tree structure programatically or with SQL
Last modified: April 21, 2021

---

# Create tree structure programatically or with SQL

 *  [sanaconeltantra](https://wordpress.org/support/users/sanaconeltantra/)
 * (@sanaconeltantra)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/create-tree-structure-programatically-or-with-sql/)
 * Hello,
    Great plugin but I need to create the tree structure for hundreds of 
   pages. I know the parent id for each child page. Do you have some php functions
   I could use to recreate the tree? Thanks!

The topic ‘Create tree structure programatically or with SQL’ is closed to new replies.

 * ![](https://ps.w.org/wp-nested-pages/assets/icon-128x128.png?rev=1690043)
 * [Nested Pages](https://wordpress.org/plugins/wp-nested-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-nested-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-nested-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-nested-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-nested-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-nested-pages/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [sanaconeltantra](https://wordpress.org/support/users/sanaconeltantra/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/create-tree-structure-programatically-or-with-sql/)
 * Status: not resolved