Title: php file and wordpress database
Last modified: August 19, 2016

---

# php file and wordpress database

 *  [silverz](https://wordpress.org/support/users/silverz/)
 * (@silverz)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/php-file-and-wordpress-database/)
 * I have a WordPress blog and would like to add a php file to it that interacts
   with the database. I am a novice(obviously) so I’m not sure what to do once I
   copy the PHP code in a notepad and save it as something.php
 * I know the WordPress blog has a SQL database and I have cPanel offered by my 
   host, so I ask for a quick point form explanation on how to generally make the
   sql database work with the php code? In other words, do I just upload the php
   file to the root directory and add a line of code (for instance: require_once(“
   something.php”); to the index.php file ?
 * Thank you very much.

The topic ‘php file and wordpress database’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [silverz](https://wordpress.org/support/users/silverz/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/php-file-and-wordpress-database/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
