WordPress Data Structure – What is in the database and what is not?


With WordPress it is important to understand what is living in the database and what is not for several reasons.

  1. Version control software like GIT does not track the database, only the site files.
  2. Several hosts with staging sites will give you database options when you push from staging to live. For example you can push just the site files, all of the databases, or just a select few. WPengine operates this way.

For this reason it is important to understand what information is kept in the MySQL database, and what is kept in the site files.

Site Files

  • Page Templates
  • Themes
  • Plugins
  • HTML files (all)
  • CSS files (all)
  • PHP files (all)
  • Javascript files (all)
  • Anything that isn’t in the database!


  • Posts: All of your blog posts and their content.
  • Pages: All of your pages and their content.
  • Map Locations: If you have a map, whether that is a dealer finder or whatever. The locations are stored in the database.
  • Comments: Any comments that have been made on posts, pages or products. Or anywhere else.
  • Media hyperlinks: all of the hyperlinks for you photos and other media.
  • Users: All userdata
  • Plugin Settings: Not the plugin files themselves, but the settings that you select in those plugins and other associated data.
  • Settings: Settings that you choose from the default Wordpress settings, as well as other areas such as theme selection. (Note: Not the actual theme itself, but the theme selection!)
  • Products: If you are running WooCommerce or another eCommerce plugin, the products and their data will be in the database.