Mass Create Categories

Brent W

Well-known member
If I had a list of categories I wanted to create is there an easy way to do this? Talking over 200 categories. SQL query?

Chris D

XenForo developer
Staff member
Nothing special, really. Just a basic:

INSERT INTO xengallery_category
   (a, b, c)
   (1, 2, 3),
   (4, 5, 6)
Where a, b, c are column names and 1, 2, 3 are values for one category and 4, 5, 6 are values for another category. Bear in mind you won't necessarily need to define all columns and values for all columns in that table. Some columns may have default values that are acceptable, e.g. the category_description field has a default value of 'blank' so if none of the categories need descriptions then you won't need to enter that in the query.