Skip to content

Instantly share code, notes, and snippets.

@mklasen
Last active June 22, 2022 16:49
Show Gist options
  • Save mklasen/3b266a0e9b4081272b703eca42bd3578 to your computer and use it in GitHub Desktop.
Save mklasen/3b266a0e9b4081272b703eca42bd3578 to your computer and use it in GitHub Desktop.
Add the 'spam' column to the wp_users table
# The script below is updated following a comment by RJT.
# If you use a different prefix, replace wp_users by the actual name of the table.
wp db query "ALTER TABLE wp_users ADD spam TINYINT NOT NULL DEFAULT 0;"
# When the spam column is missing, the ‘deleted’ column might be missing as well.
wp db query "ALTER TABLE wp_users ADD deleted TINYINT NOT NULL DEFAULT 0;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment