Title: Maintaining WP by SQL
Last modified: August 21, 2016

---

# Maintaining WP by SQL

 *  [averykrouse](https://wordpress.org/support/users/averykrouse/)
 * (@averykrouse)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/maintaining-wp-by-sql/)
 * Greetings all. I work for a non-profit that has about 700 branches across the
   world. We’re looking at using the Elegant Themes theme “Explorable” (located 
   [here](http://www.elegantthemes.com/gallery/explorable/)) to create an interactive
   map of our branches.
 * We maintain the information for each of our branches in a database that can be
   queried via SQL, and I’m thinking that instead of independently maintaining each
   of what would be 700+ entries anytime something changes, we could handle it via
   the database.
 * Basically what I’m interesting in learning (as I’m a front-end kind of guy, not
   a back end kind of guy) is if it would be possible to basically query and export
   a spreadsheet of data from the database, then use that data to form the post 
   information on WordPress.
 * Anyone have experience with this? Any tips or tutorials you could provide?

Viewing 1 replies (of 1 total)

 *  [rorymorris](https://wordpress.org/support/users/rorymorris/)
 * (@rorymorris)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/maintaining-wp-by-sql/#post-3836749)
 * Yes, this is certainly possible. You are right, it’d be a struggle maintaining
   it in two places, especially at that size.
 * You have two options, you can export from your existing database and create a
   custom labelled CSV file containing your database info. You’d have to map column
   names to fields, i.e. post_title and post_content and so on. Then you use the
   WordPress Importer plugin to import your CSV as posts into WP. This option would
   of course need you to export from database #1, convert to WP importable CSV, 
   and import into WP every time you want to update both in both places.
 * Second, preferable option would be to connect directly to database #1 from your
   WP installation. Then you can change the Explorable themes query of the WP database
   to simply PHP loop through data from your original database.
 * Email me if you need assistance with this, [http://rorymorris.co.uk](http://rorymorris.co.uk)

Viewing 1 replies (of 1 total)

The topic ‘Maintaining WP by SQL’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [Explorable](https://wordpress.org/support/topic-tag/explorable/)
 * [mapping](https://wordpress.org/support/topic-tag/mapping/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [rorymorris](https://wordpress.org/support/users/rorymorris/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/maintaining-wp-by-sql/#post-3836749)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
