Title: Uploading theme with sql help.
Last modified: August 12, 2018

---

# Uploading theme with sql help.

 *  [OMIGO](https://wordpress.org/support/users/omi-mexico/)
 * (@omi-mexico)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/uploading-theme-with-sql-help/)
 * I have a theme that I am uploading to wp themes. However I cannot figure out 
   how to get our theme to generate its own sql prefix and url.
 * Currently users have to manually edit the sql prefix.
 * I know there is an automated process thay accures during install, but i cant 
   seem to get it to work.
 * Any help is greatly appreciated.

Viewing 1 replies (of 1 total)

 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/uploading-theme-with-sql-help/#post-10582641)
 * Do you mean that in your code you are querying the database using the `wp_` prefix?
   If you’re querying the database in a theme or plugin you should be using `$wpdb`
   and use `$wpdb->prefix` to get the user’s database prefix.

Viewing 1 replies (of 1 total)

The topic ‘Uploading theme with sql help.’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/uploading-theme-with-sql-help/#post-10582641)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
