Title: [Plugin: sCategory Permalink] Export permalinks
Last modified: August 19, 2016

---

# [Plugin: sCategory Permalink] Export permalinks

 *  [eiland](https://wordpress.org/support/users/eiland/)
 * (@eiland)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-scategory-permalink-export-permalinks/)
 * Is there a way to export all scategory permalinks-urls, for example together 
   with post ids or “regular” post titles? Or in the regular wordpress export?
 * I need this for a wordpress migration….
 * I’ve been looking at the table, but the postmeta table doesn’t make me very happy….
   i have to think hard about sql join statements…
 * [http://wordpress.org/extend/plugins/scategory-permalink/](http://wordpress.org/extend/plugins/scategory-permalink/)

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

 *  Thread Starter [eiland](https://wordpress.org/support/users/eiland/)
 * (@eiland)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-scategory-permalink-export-permalinks/#post-1784265)
 * This goes a while, but needs to undouble:
 *     ```
       SELECT term3.slug, term2.slug, term1.slug, wp_terms.slug, wp_posts.post_name
       FROM wp_posts
       LEFT JOIN (
       wp_postmeta,
       wp_terms,
       wp_terms AS term1,
       wp_terms AS term2,
       wp_terms AS term3,
   
       wp_term_taxonomy,
       wp_term_taxonomy AS tax1,
       wp_term_taxonomy AS tax2,
       wp_term_taxonomy AS tax3
   
       ) ON (
   
       wp_posts.ID = wp_postmeta.post_id
   
       AND wp_terms.term_id = wp_postmeta.meta_value
       AND wp_postmeta.meta_key = "_category_permalink"
       AND wp_terms.term_id = wp_term_taxonomy.term_id
       AND wp_term_taxonomy.parent = term1.term_id
       AND term1.term_id = tax1.term_id
       AND tax1.parent = term2.term_id
       AND term2.term_id = tax2.term_id
       AND tax2.parent = term3.term_id
       )
       ```
   
 *  Thread Starter [eiland](https://wordpress.org/support/users/eiland/)
 * (@eiland)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-scategory-permalink-export-permalinks/#post-1784387)
 * sorry:
 *     ```
       SELECT DISTINCT wp_terms.term_id, wp_postmeta.post_id, term3.slug, term2.slug, term1.slug, wp_terms.slug, wp_posts.post_name, wp_posts.post_title
   
       FROM wp_postmeta
   
       LEFT JOIN wp_posts ON wp_postmeta.post_id=wp_posts.ID
   
       LEFT JOIN wp_terms ON wp_postmeta.meta_value=wp_terms.term_id
   
       LEFT JOIN wp_term_taxonomy ON wp_term_taxonomy.term_id = wp_terms.term_id
   
       LEFT JOIN wp_terms AS term1 ON term1.term_id = wp_term_taxonomy.parent
   
       LEFT JOIN wp_term_taxonomy AS tax1 ON tax1.term_id = term1.term_id
   
       LEFT JOIN wp_terms AS term2 ON term2.term_id = tax1.parent
   
       LEFT JOIN wp_term_taxonomy AS tax2 ON tax2.term_id = term2.term_id
       LEFT JOIN wp_terms AS term3 ON term3.term_id = tax2.parent
   
       WHERE wp_postmeta.meta_key = "_category_permalink"
       ```
   

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

The topic ‘[Plugin: sCategory Permalink] Export permalinks’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/scategory-permalink.svg)
 * [sCategory Permalink](https://wordpress.org/plugins/scategory-permalink/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/scategory-permalink/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/scategory-permalink/)
 * [Active Topics](https://wordpress.org/support/plugin/scategory-permalink/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/scategory-permalink/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/scategory-permalink/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [eiland](https://wordpress.org/support/users/eiland/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-scategory-permalink-export-permalinks/#post-1784387)
 * Status: not resolved