The WordPress database may seem like a necessary evil to many developers, yet understanding how it works is a great way to start writing better code. Knowing exactly what happens when you create a taxonomy or add a post will help take the “magic” factor out of programming – where you don’t quite know why something works. In this article, I’ll shed some light on each table in the database, what you can expect to be there, how functions affect it and what the bare essentials are. Let’s jump right in. How Table Names in WordPress Work The name of each table in WordPress is composed of two parts: a prefix and the table name. The prefix is wp_ by default, but it can be set to anything you like using the wp-config.php file. In fact, changing your prefix to something unpredictable like hwuBedFs83_ is a good idea, it will make your site that much safer. Prefixes exist because in some cases you may want to put multiple installations of WordPress within the same database. Prefixes make this easy, all you need to do is make sure each site has a different prefix. When used in a multisite environment, WordPress actually does the same thing, it uses different prefixes (incrementing them) for different
Share This