WP Recommended Table Exclusions?


I just re-designed my WP work flow to utilize 2 bash scripts (push.sh & pull.sh) that I wrote that will push/pull my files with git, upload/download & import/export my dbs using rsync and wp-cli.

There are 2 plugins whose settings I don’t want to download/upload & constantly change whether I am work on test or production: lite-speed-cache and ithemes security plugin respectively. Therefore, I exclude the plugin files from git using .gitignore and I research wp-cli documentation and learned how to exclude the respective tables of those plugins.

# Skip certain tables from the exported database
$ wp db export --exclude_tables=wp_options,wp_users
Success: Exported to 'wordpress_dbase-db72bb5.sql'.

# Skip all tables matching a wildcard from the exported database
$ wp db export --exclude_tables=$(wp db tables 'wp_user*' --format=csv)
Success: Exported to 'wordpress_dbase-db72bb5.sql'.

Sorry if this is a rookie question, but I’d rather risk asking the dumb question, rather than not knowing:

With my previously described work flow are there other tables within the basic wp db that I should also exclude from my regular development workflow? wp_users, etc, etc. a specific list would be awesome.

(I get full db backups from other scripts on a regular basis, so I am looking to streamline the dbs that I pulling and pushing between test / prod.)


mjones 1 week 2022-09-17T03:20:40-05:00 0 Answers 0 views 0

Leave an answer