WordPress.org

Forums

Import XML with PHP (2 posts)

  1. Mayessache
    Member
    Posted 2 years ago #

    Hi,

    I would like to import XML with PHP.
    I created a deployment script for WordPress and a PHP page which create a XML file with my menus, my contents etc...
    But I have to import my file with the import button on the admin section.
    Is there a way to import directly with PHP or any other language ?
    (I know there is a way, but I started reading WordPress files and aborted it because it's too hard for me, PHP-beginer)

    Thx,
    Mayessache.

  2. bcworkz
    Member
    Posted 2 years ago #

    I assume by "import" you want to retrieve the file's content (HTTP), and you don't need to actually copy the file itself (FTP). The best approaches would be to use the WP HTTP API or with straight PHP, use cURL, as long as your server has this module loaded.

Topic Closed

This topic has been closed to new replies.

About this Topic