Title: Adding SQL / PHP to WordPress
Last modified: August 30, 2016

---

# Adding SQL / PHP to WordPress

 *  Resolved [Famke__](https://wordpress.org/support/users/famke_/)
 * (@famke_)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-sql-php-to-wordpress/)
 * Hi there,
 * I’m kind of new to WordPress and haven’t been able to find my answer anywhere.
   I’m working on a website that will function as an “online helpdesk” for customers
   of a company. The idea is that they will go to the website, log on and search
   for documents, manuals and FAQ.
 * Those documents, manuals and FAQ will be put into a database and I want to call
   them so that the documents etc show up on the website.
 * My questions are:
    * is it possible to add SQL / PHP to WordPress and have it
   do this? * if yes, does the coding differ from “regular” SQL / PHP? * in which
   file do I put this code so that it will work? (I’m thinking it should be functions.
   php, but I’m really not sure).
 * Thanks in advance, I really hope you can help me out!
    – Famke

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

 *  [Chris A. a11n](https://wordpress.org/support/users/aprea/)
 * (@aprea)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-sql-php-to-wordpress/#post-6216891)
 * Are the documents, manuals and FAQs pre-existing in a current database structure
   or are they yet to be created yet? If it’s the latter I would suggest adding 
   this content directly into WordPress as pages or even as a custom post type.
 * It’s much easier to have all your content within WordPress itself as you’ll be
   able to easily manage the content within the WordPress dashboard. If your content
   is separate to WordPress you’ll need to manage the content via another interface
   which might be inconvenient.
 * If you’re adamant about the having content separate to WordPress you can use 
   the `$wpdb` class to access the database. You can read more about the `$wpdb`
   class here: [https://codex.wordpress.org/Class_Reference/wpdb](https://codex.wordpress.org/Class_Reference/wpdb)
 *  Thread Starter [Famke__](https://wordpress.org/support/users/famke_/)
 * (@famke_)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-sql-php-to-wordpress/#post-6216917)
 * Thanks for the quick response!
 * Adding everything directly into WordPress sounds easier and better for my client,
   as they’ll need to update things and put in new files. However, I need to be 
   able to show “the right documents at the right time”. Users need to be able to
   filter, so they’ll go to Manuals, then choose a subcategory and another subcategory.
   Is it possible to implement this if I put into WordPress directly? And is it 
   easier than to use `$wpdb`?
 *  [Chris A. a11n](https://wordpress.org/support/users/aprea/)
 * (@aprea)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-sql-php-to-wordpress/#post-6217009)
 * You might want to look into a documentation or FAQ plugin. You might be able 
   to find something useful in this search [https://wordpress.org/plugins/tags/documentation](https://wordpress.org/plugins/tags/documentation)

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

The topic ‘Adding SQL / PHP to WordPress’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Chris A. a11n](https://wordpress.org/support/users/aprea/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/adding-sql-php-to-wordpress/#post-6217009)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
