Find ‘contributor’ users associated with posts in a WordPress Database

I am trying to pull information out of a WordPress database, and add it to my own (structured differently & not for running a WordPress site on)

On this WordPress website, users are assigned the ‘contributor’ group/permissions on a specific post, so they can edit only that post.

Read More

On my database, I have copied across all of the posts and all of the users from the WordPress database.

Now somewhere in the WordPress database there should be something linking the user and post together via an ‘ID’ to give them contributor status for that post.

I have managed to find the following:

wp_usermeta table:

user_id: 8
meta_key: wp_capabilities
meta_value: a:1:{s:11:"contributor";b:1;}

So here we can see we have our user and capabilities, with a user_id of ‘8’ and meta_value of ‘contributor’… but I can’t find anything to link the user with the posts they have been assigned to. Somewhere I am expecting to find a user id and post id in the same row, linking the two so I know which user relates to which post, but I’ve had no luck, even after much research.

So if anyone is experienced with WP databases, please help 🙁

Related posts

1 comment

Comments are closed.