Title: Access wordpress function from external script
Last modified: August 19, 2016

---

# Access wordpress function from external script

 *  Resolved [MWM](https://wordpress.org/support/users/mike235/)
 * (@mike235)
 * [16 years ago](https://wordpress.org/support/topic/access-wordpress-function-from-external-script/)
 * Hi,
 * I have a php script that I call when a form is submitted (from a plugin I’m developing),
   obviously this script does not have access to the wordpress functions.
 * How can I access the wordpress functions? Specifically, I want to access the 
   get_option function
 * Any idea would be great

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

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [16 years ago](https://wordpress.org/support/topic/access-wordpress-function-from-external-script/#post-1501352)
 * [http://codex.wordpress.org/Plugin_API/Hooks_2.0.x](http://codex.wordpress.org/Plugin_API/Hooks_2.0.x)
 * [http://codex.wordpress.org/Plugin_API/Filter_Reference](http://codex.wordpress.org/Plugin_API/Filter_Reference)
 *  Thread Starter [MWM](https://wordpress.org/support/users/mike235/)
 * (@mike235)
 * [16 years ago](https://wordpress.org/support/topic/access-wordpress-function-from-external-script/#post-1501376)
 * I just found what I needed here :
    [http://wpengineer.com/embed-wordpress-functions-outside-wordpress/](http://wpengineer.com/embed-wordpress-functions-outside-wordpress/)
 * It’s very easy in fact, just add : `require( '../../../wp-load.php' );`
    at the
   top of your script (with relative path pointing to WP root on your server of 
   course)

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

The topic ‘Access wordpress function from external script’ is closed to new replies.

## Tags

 * [external](https://wordpress.org/support/topic-tag/external/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [Get_Option](https://wordpress.org/support/topic-tag/get_option/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 2 replies
 * 2 participants
 * Last reply from: [MWM](https://wordpress.org/support/users/mike235/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/access-wordpress-function-from-external-script/#post-1501376)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
