The MU forums have moved to WordPress.org

Load WPMU environment into an external website (4 posts)

  1. JohnyRed
    Member
    Posted 15 years ago #

    Hi,

    I have a site setup where I import Wordpress news and content into it. The site is at http://www.gamesphere.com.br/v5/ and wordpress is installed at http://www.gamesphere.com.br/v5/noticias. In my website I us:

    include_once("./wp/wp-load.php");

    to load in the WP variables which allows me to import news and content.

    I recently installed WPMU and am trying to do the same thing, however when I goto http://www.gamesphere.com.br/v5/ I get automatically redirected to my WPMU install that is at www2.gamesphere.com.br.

    Does anyone know what I have to change to be able to do to get this working?

    Thanks

  2. tdjcbe
    Member
    Posted 15 years ago #

    Not 100% sure but index.php loads wp-blog-header.php instead.

    http://trac.mu.wordpress.org/browser/trunk/index.php

    Haven't tried this myself but I did want to point that out.

  3. JohnyRed
    Member
    Posted 15 years ago #

    Hey thanks for the reply!

    Im still getting redirected for some reason.

    I wonder if I could copy the wp-load.php or the wp-blog-header.php and make a different version of it just so it would load the environment only.

    Thanks for the help again, if you have any other tips, please let me know.

    Thanks

  4. JohnyRed
    Member
    Posted 15 years ago #

    Hey I fixed it.

    What I did was create copies of a few files and removed 2 lines ) from the wpmu-settings2.php file.

    The files I copied were:

  5. wp-load.php -> saved as -> wp-load2.php
  6. wp-config.php -> saved as -> wp-config2.php
  7. wp-settings.php -> saved as -> wp-settings2.php
  8. wpmu-settings.php -> saved as -> wpmu-settings2.php
  9. In the wpmu-settings2.php I commented out the following 2 lines (lines 325 and 327:

    header( "Location: http://" . $current_site->domain . $current_site->path );
    
    exit;

    Thats it.
    Im am now able to load posts into my site from the WPMU setup.

    :)

About this Topic