Title: Using the wordpress api from another file
Last modified: August 19, 2016

---

# Using the wordpress api from another file

 *  [sree01](https://wordpress.org/support/users/sree01/)
 * (@sree01)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/using-the-wordpress-api-from-another-file-1/)
 * I want to use the wordpress api from a php(test.php) file located outside the
   wordpress directory.I want to create post and create post category in the wordpress
   from this php(test.php) file. i want to use the following functions
    - wp_insert_post
    - wp_insert_category
    - category_exists
    - wp_set_post_tags
 * please give the **list of files** to be included to use these functions
 * Sree

Viewing 1 replies (of 1 total)

 *  [pampfelimetten](https://wordpress.org/support/users/pampfelimetten/)
 * (@pampfelimetten)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/using-the-wordpress-api-from-another-file-1/#post-931804)
 * you just have to include wp-load.php in the root directory.

Viewing 1 replies (of 1 total)

The topic ‘Using the wordpress api from another file’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [pampfelimetten](https://wordpress.org/support/users/pampfelimetten/)
 * Last activity: [17 years, 6 months ago](https://wordpress.org/support/topic/using-the-wordpress-api-from-another-file-1/#post-931804)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
