Title: How to add article/post via external PHP code?
Last modified: August 24, 2016

---

# How to add article/post via external PHP code?

 *  [PaperMaster1](https://wordpress.org/support/users/papermaster1/)
 * (@papermaster1)
 * [11 years ago](https://wordpress.org/support/topic/how-to-add-articlepost-via-external-php-code/)
 * I need to Add post/article from my local text files to a WordPress website via
   php script (that can make also parse raw text files to a WP format). Is there
   any API or something like that?

Viewing 1 replies (of 1 total)

 *  [headonfire](https://wordpress.org/support/users/headonfire/)
 * (@headonfire)
 * [11 years ago](https://wordpress.org/support/topic/how-to-add-articlepost-via-external-php-code/#post-6152558)
 * There are several ways to import posts into WordPress. If you need to run import
   from external location instead of wp-admin (say, your local computer with any
   MAMP-like local server), you should try WP REST API. See [here](https://wordpress.org/plugins/json-rest-api/)
   and [here](http://wp-api.org/) for details.

Viewing 1 replies (of 1 total)

The topic ‘How to add article/post via external PHP code?’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [headonfire](https://wordpress.org/support/users/headonfire/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/how-to-add-articlepost-via-external-php-code/#post-6152558)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
