Title: Mass adding through database &#8211; generating post page/slug
Last modified: August 22, 2016

---

# Mass adding through database – generating post page/slug

 *  [tokiok](https://wordpress.org/support/users/tokiok/)
 * (@tokiok)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/mass-adding-through-database-generating-post-pageslug/)
 * Hello,
 * If I upload videos through database (csv file), is there some way to run the 
   command that turns that data into a post?
 * I’ve got links and data in the database, and the videos will play through the
   featured video player, but there is no page for each video, since it hasn’t been
   created. The slug for everything is empty.
 * So is there some way to run the function that creates the pages, and have it 
   create a page/slug for each database entry? Rather than having to add videos 
   one by one through the control panel.
 * Thanks
 * [https://wordpress.org/plugins/contus-video-gallery/](https://wordpress.org/plugins/contus-video-gallery/)

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

 *  [karthikeyani](https://wordpress.org/support/users/karthikeyani/)
 * (@karthikeyani)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/mass-adding-through-database-generating-post-pageslug/#post-5565700)
 * Hi,
 * Contact the support team at [assist@apptha.com](https://wordpress.org/support/topic/mass-adding-through-database-generating-post-pageslug/assist@apptha.com?output_format=md).
   So that we can check and assist you accordingly.
 *  [kobak](https://wordpress.org/support/users/kobak/)
 * (@kobak)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/mass-adding-through-database-generating-post-pageslug/#post-5565938)
 * Any update on this? I am in the same situation. Posts imported, but no slugs.
 *  [karthikeyani](https://wordpress.org/support/users/karthikeyani/)
 * (@karthikeyani)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/mass-adding-through-database-generating-post-pageslug/#post-5565939)
 * Hi,
 * If you want to add videos through database and not in admin panel, you need to
   follow the below steps.
 * 1) First insert the video detail in `WPPREFIX_hdflvvideoshare` and `WPPREFIX_hdflvvideoshare_med2play`
   tables. `WPPREFIX_hdflvvideoshare_med2play` table is to connect your video with
   the respective category (playlist). You can get playlist ID in the following 
   table `WPPREFIX_hdflvvideoshare_playlist`.
 * 2) Now open `WPPREFIX_posts` table and run the following query.
 * `INSERT INTO`WPPREFIX_posts`(`ID`,`post_author`,`post_date`,`post_date_gmt`,`
   post_content`,`post_title`,`post_excerpt`,`post_status`,`comment_status`,`ping_status`,`
   post_password`,`post_name`,`to_ping`,`pinged`,`post_modified`,`post_modified_gmt`,`
   post_content_filtered`,`post_parent`,`guid`,`menu_order`,`post_type`,`post_mime_type`,`
   comment_count`) VALUES (NULL, '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00','[
   hdvideo id=VIDEOID]', 'database insert', '', 'publish', 'open', 'open', '', '
   database-insert', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', '
   0', 'http://SITE_URL/?post_type=videogallery&p=', '0', 'videogallery', '', '0');`
 * **Note :** Replace **WPPREFIX **with your table prefix and **VIDEOID** with the
   video ID that was inserted previously in `WPPREFIX_hdflvvideoshare` table. Replace**
   SITE_URL** with your base url.
 * 3) Once you executed the above query, get the inserted post ID from the same `
   WPPREFIX_posts` table and edit that item. Now add your post ID at the end of 
   the URL in `guid` field. For eg: replace `http://SITE_URL/?post_type=videogallery&
   p=` with `http://SITE_URL/?post_type=videogallery&p=26`.
 * 4) Finally get this post ID and insert into the `slug` field of the corresponding
   video ID in `WPPREFIX_hdflvvideoshare` table.
 * If you have any other queries feel free to contact support team at [assist@apptha.com](https://wordpress.org/support/topic/mass-adding-through-database-generating-post-pageslug/assist@apptha.com?output_format=md)

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

The topic ‘Mass adding through database – generating post page/slug’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contus-video-gallery_ba544b.svg)
 * [WORDPRESS VIDEO GALLERY](https://wordpress.org/plugins/contus-video-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contus-video-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contus-video-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/contus-video-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contus-video-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contus-video-gallery/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [karthikeyani](https://wordpress.org/support/users/karthikeyani/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/mass-adding-through-database-generating-post-pageslug/#post-5565939)
 * Status: not resolved