Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter robert_t_taylor

    (@robert_t_taylor)

    I finally got this working by:

    1. Defining a temp folder in the wp-config.php file:
      /** Define a temp directory */
      define('WP_TEMP_DIR', '/vagrant/wp-content/temp');
    2. Prepending the file write in class-spider.php with the temp folder location:
      file_put_contents(get_temp_dir().'/head.htm',$head_HTML);

    Hope that helps someone else. Let me know if you have any other thoughts.

    aamche

    (@aamche)

    Thanks got it working, but I changed it a little bit to use the wp-content folder.

    file: classes/class-spider.php
    line: 446 (approx)

    change

    file_put_contents('.head.htm',$head_HTML);

    to

    $upload_dir = wp_upload_dir();
    $this->upload_dir = $upload_dir['basedir'] . '/easy-site-importer/';
    if(!file_exists($this->upload_dir)){
    	mkdir($this->upload_dir, 0777);
    }
    file_put_contents($this->upload_dir . 'head.htm',$head_HTML);

    And then (about line 497)

    $this->meta[$page]=array_merge(array('Title' => $title[1], 'Scrape' => $scrape, 'Filter' => $actual_HTML, 'Formatted' => $this->proc_HTML, 'Images' => $this->images_copy),get_meta_tags('.head.htm'));

    to

    $this->meta[$page]=array_merge(array('Title' => $title[1], 'Scrape' => $scrape, 'Filter' => $actual_HTML, 'Formatted' => $this->proc_HTML, 'Images' => $this->images_copy),get_meta_tags($this->upload_dir . 'head.htm'));

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Running Easy Site Importer Under Vagrant’ is closed to new replies.