Title: Using custom includes
Last modified: August 19, 2016

---

# Using custom includes

 *  [halmowlez](https://wordpress.org/support/users/halmowlez/)
 * (@halmowlez)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/using-custom-includes/)
 * I’ve found something I don’t understand – hope someone can enlighten me!
 * I’ve been moving a static site over to WP and wanted to use a PHP include to 
   replace the old HTML version. So I created the PHP file and put it in my old 
   includes folder (in the root). But in the WP template I kept getting the path
   wrong.
 * I was playing around with <?php include(‘wp-includes/file.php’); ?> and discovered
   that this works — even though file.php is not in that directory but in my old‘
   includes’ directory.
 * I’m happy that it works — but how did WP find that file? Should I move it to 
   the ‘wp-includes’ directory? But if I did, would it get overwritten if I do an
   automatic upgrade in the future?

The topic ‘Using custom includes’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [halmowlez](https://wordpress.org/support/users/halmowlez/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/using-custom-includes/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
