vsilvestre22
vsilvestre22

Reputation: 101

Is it possible to run out of ID numbers in Wordpress?

In Wordpress, every post (entry, product, etc) has a unique ID number. As the sites grow up in content, I've realized that the ID numbers are increasing constantly.

I'm guessing that the number of posts available can be quite high (or so I hope!) but I'm asking out of curiosity. Is there actual limit of posts you can have?

What happens when a post is deleted? Do the system fill up the gaps in some way?

Is it OK to leave the posts there to grow old like the wine or is it a good practice to clean up every now and then if you have too many?

Upvotes: 0

Views: 1047

Answers (1)

Jory Geerts
Jory Geerts

Reputation: 1977

The wp_post.ID column is a unsigned bigint, which (in MySQL, the database used by Wordpress) can store values from 0 to 18446744073709551615 ((2^64)-1). So in theory, that is the maximum number of posts.

Now, there are other tables that get multiple rows for each post and those tables have the same maximum (because their ID column is also a unsigned bigint). For example "posts meta" and comments. Because of that, you'll run into problems a bit sooner, but even if posts_meta gets 1000 rows for each post, you'll still have about 1844674407370955 posts you can make before you run into this limit.

Now, the question wasn't "is there a maximum amount of posts", the question is "is it possible to run out of IDs". I would call creating 1844674407370955 posts impossible, so: no.

Upvotes: 3

Related Questions