Title: connecting php script with wordpress API
Last modified: August 30, 2016

---

# connecting php script with wordpress API

 *  [MrSteed](https://wordpress.org/support/users/mrsteed/)
 * (@mrsteed)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/connecting-php-script-with-wordpress-api/)
 * Hey guys!
 * I was wondering how to get a connection to the wordpress API from an external
   script.
 * In the root directory I have a php script which needs to access WP to read page
   contents.
 * To get the content of a page (what the php script is supposed to do) I’ve found
   the following thread on the forums:
    [https://wordpress.org/support/topic/how-display-content-on-a-custom-page?replies=9](https://wordpress.org/support/topic/how-display-content-on-a-custom-page?replies=9)
 * But which files need to be included to use, for example, get_header()?
    My script
   is not a template, at least I think so.
 * I’ve also found an article for wordpress includes ([https://codex.wordpress.org/Include_Tags](https://codex.wordpress.org/Include_Tags)),
   but it still doesn’t help, as long there is no connection to the WP system.
 * This might be a nooby question, but my research ended in no solution.
    I hope
   you can help me, Regards!
 * _[ [No bumping please](http://codex.wordpress.org/Forum_Welcome#No_Bumping). ]_

The topic ‘connecting php script with wordpress API’ is closed to new replies.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [connection](https://wordpress.org/support/topic-tag/connection/)
 * [external script](https://wordpress.org/support/topic-tag/external-script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [MrSteed](https://wordpress.org/support/users/mrsteed/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/connecting-php-script-with-wordpress-api/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
