Title: Permalinks &amp; wp_posts problem
Last modified: August 20, 2016

---

# Permalinks & wp_posts problem

 *  [NicotineLL](https://wordpress.org/support/users/nicotinell/)
 * (@nicotinell)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/permalinks-wp_posts-problem/)
 * Hello guys,
 * I’m developing a new website, but I can’t quite figure out a solution to my permalinks
   problem.
 * My main website is [http://w3spine.com](http://w3spine.com), I’m sending posts
   to my second WP [http://w3lol.com](http://w3lol.com) and I want posts permalinks
   to be like so [http://w3lol.com/138581](http://w3lol.com/138581)
 * The problem is that I cannot use post ID since there are a whole bunch of other
   stuff that are stored in wp_posts and the IDs skip some numbers (ex. first is
   50 next is 54 (1 post, 2 revisions and 1 attachment), 58, 62, etc) and I need
   the urls to be in order -> 50, 51, 52, 53, etc.
 * The easiest way here is to use post slug as a permalink, but this will be problematic
   to regular users who have to skip a lot of images just to find the ones they 
   haven’t seen yet.
 * Any solution will do, I don’t mind hardcoding.

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/permalinks-wp_posts-problem/#post-3353799)
 * I don’t see the problem with slug permalinks. If the first image is the last 
   one added, and they are chronological, as regular user, I’ll just arrow back 
   through the images until things look familiar. Pretty much the way any blog works.
   Why confuse things?
 * To answer your question, you could create a equivalence table with a unique ‘
   lol’ index id paired with the actual post id. Any post identified as being part
   of this collection gets it’s id added to the next available index number. Thus
   the ‘lol’ id will always be sequential with no gaps, assuming you never delete
   anything. If you delete things, you’ll need to invoke some sort of garbage collection
   scheme to fill the gaps.
 *  Thread Starter [NicotineLL](https://wordpress.org/support/users/nicotinell/)
 * (@nicotinell)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/permalinks-wp_posts-problem/#post-3353818)
 * I managed to do it!
 * First off, it was pointed out to me that if I leave posts with numeric permalinks
   they will eventually conflict with years and other slugs. This is why I added
   additional “i” in front of the numbers.
 * My solution was to edit the Social Network Auto Poster plugin’s WP option to 
   send slugs as well (it is not set by default). I added an entry in wp_options
   that holds the number of posts sent via this plugin WP option, which if the post
   is successfully transfered is incremented by 1.
 * Now the posts slugs are build like this: i1, i2, i3, etc.
 * I think it’s looking good and I hope I didn’t miss anything that might result
   if future problems…

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

The topic ‘Permalinks & wp_posts problem’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [NicotineLL](https://wordpress.org/support/users/nicotinell/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/permalinks-wp_posts-problem/#post-3353818)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
