Title: including a php file outside wordpress
Last modified: August 19, 2016

---

# including a php file outside wordpress

 *  [gab1982](https://wordpress.org/support/users/gab1982/)
 * (@gab1982)
 * [18 years ago](https://wordpress.org/support/topic/including-a-php-file-outside-wordpress/)
 * I need to include a file outside of the wordpress directory i have looked at 
   the support document but can’t seem to get it working, is there a way i can do
   this without moving the file i want included.

Viewing 1 replies (of 1 total)

 *  820984
 * [17 years, 10 months ago](https://wordpress.org/support/topic/including-a-php-file-outside-wordpress/#post-785922)
 * you need the following line on top of your .php file:
 * `<?php require_once("./wp-blog-header.php"); ?>`
 * If it is sitting outside the wordpress installation directory just change the
   url to reflect that.

Viewing 1 replies (of 1 total)

The topic ‘including a php file outside wordpress’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: 820984
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/including-a-php-file-outside-wordpress/#post-785922)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
