The wp_options
table stores a WordPress website's settings and configurations, including site-wide settings such as site title, description, and URL, as well as plugin and theme specific settings, and various other configurations.
Columns
option_id
: Auto incrementing integer ID, used as primary key. It has no other meaning.
option_name
: Name of the option. This column is used to uniquely identify the option. Examples: "siteurl" or "blogname".
option_value
: Value of the option as a serialized string. Examples: "https://www.wpdir.com" for the "siteurl" option or "WPDir" for the "blogname" option.
autoload
: This column specifies whether the option should be automatically loaded when WordPress is initialized. Possible values are "yes" or "no".
SQL Schema
CREATE TABLE `wp_options` (
`option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`option_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`option_value` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`autoload` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'yes',
PRIMARY KEY (`option_id`),
UNIQUE KEY `option_name` (`option_name`),
KEY `autoload` (`autoload`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;