Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating tables with WP plugin

I'm beginning to write wordpress plugins, and I've found a situation where I need to create tables to continue. Can someone point to a decent tutorial on modifying Wordpress's database?

Their usually excellent documentation seems lacking on this topic.

like image 850
YsoL8 Avatar asked Jan 20 '26 08:01

YsoL8


1 Answers

The WordPress Codex has a good article on creating database tables with Plugins.

Like Benoit said, most of the times wp_options is sufficient, but that article is a good guide to getting started with a custom table if you need it. First though, I'd advise you to look and see if it can logically be done without creating a new table. Custom Post Types can handle most of the heavy lifting for most content-related functions. The bottom of the Custom Post Types Codex entry has several good tutorials for getting started.

like image 128
jdp Avatar answered Jan 22 '26 01:01

jdp