Title: Setup Database Programatically
Last modified: October 18, 2019

---

# Setup Database Programatically

 *  Resolved [kcharle](https://wordpress.org/support/users/kcharle/)
 * (@kcharle)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/setup-database-programatically/)
 * Hi all,
 * I’m wondering if anyone could point me in the right direction on how I would 
   go about either generating the base WordPress database schema programmatically,
   whether that’s grabbing the SQL statements and running them myself, or if I can
   call a function within the WordPress core that would run the SQL statements for
   me?
 * Any help would be greatly appreciated!
 * Cheers

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [6 years, 8 months ago](https://wordpress.org/support/topic/setup-database-programatically/#post-12035771)
 * Look at the WP CLI utility for things like this
 * [https://wp-cli.org/](https://wp-cli.org/)
    [https://make.wordpress.org/cli/handbook/quick-start/](https://make.wordpress.org/cli/handbook/quick-start/)
 *  Thread Starter [kcharle](https://wordpress.org/support/users/kcharle/)
 * (@kcharle)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/setup-database-programatically/#post-12037190)
 * [@sterndata](https://wordpress.org/support/users/sterndata/)
 * Perfect, thank you my friend!
 *  Thread Starter [kcharle](https://wordpress.org/support/users/kcharle/)
 * (@kcharle)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/setup-database-programatically/#post-12037191)
 * Closing.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Setup Database Programatically’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [kcharle](https://wordpress.org/support/users/kcharle/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/setup-database-programatically/#post-12037191)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
