Load Wordpress page content from external php


Staff member
Has anyone ever used wordpress as a CMS and tried to render pages, articles and widgets on php-pages which are on the same server, but in another directory? I have to mix two CMSs as a migration strategy to wordpress.

Lets say wordpress is installed in folder ./wp and there is a page with permalink /wp/testpage. I create a file test.php in folder ./tests/
What I alreay tried is:

  global $page; 
  $page = 616; //looked up post id

 require_once '../wp/index.php';


But that just shows me a 404 wordpress page - footer and header are loaded correctly, but not the content.