Skip to content

Instantly share code, notes, and snippets.

@manuelricci
Last active January 28, 2021 16:13
Show Gist options
  • Save manuelricci/9e2166fcb0df2b5eba4ede48b7afde9c to your computer and use it in GitHub Desktop.
Save manuelricci/9e2166fcb0df2b5eba4ede48b7afde9c to your computer and use it in GitHub Desktop.
SQL query to find WordPress table prefix
SELECT DISTINCT SUBSTRING(`TABLE_NAME` FROM 1 FOR ( LENGTH(`TABLE_NAME`)-8 ) )
FROM information_schema.TABLES WHERE
`TABLE_NAME` LIKE '%postmeta';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment