• Hi I have WordPress and index.php in the root directory. I want to install Open Journal System (OJS) on the same directory which have index.php file.

    Can I change the WordPress index.php file to home.php ?

    I tried mixing the codes of both index.php files but they don’t work. Code for OJS index.php is as under

    <?php
    
    // Initialize global environment
    define('INDEX_FILE_LOCATION', __FILE__);
    require('./lib/pkp/includes/bootstrap.inc.php');
    
    // Serve the request
    $application =& PKPApplication::getApplication();
    $application->execute();
    
    ?>
Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Can I change the WordPress index.php file to home.php ?

    No, wordpress has its own use for home.php

    Thread Starter escijournals

    (@escijournals)

    Thanks. Can I rename index.php to any other name so that index.php remains for OJS not for WordPress ?

    or is there any way I can mix the both codes in single index.php file?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    no, index.php is required for WordPress.

    Thread Starter escijournals

    (@escijournals)

    Steve Stern,

    Thank you for your support. Can I change the index.php by mixing the below code before the wordpress code starts ?

    <?php
    
    // Initialize global environment
    define('INDEX_FILE_LOCATION', __FILE__);
    require('./lib/pkp/includes/bootstrap.inc.php');
    
    // Serve the request
    $application =& PKPApplication::getApplication();
    $application->execute();
    
    ?>

    I wouldn’t.

    If you need that anywhere, add it to your sites wp-config.php file.

    The biggest question here is why do you need to have both systems running in the same folder? That’s a recipe for disaster… One of them will most likely “take over” in some cases, and break the other one. Things like this are normally installed in separate folders because that’s really the only sane way to set things up. Anything else is asking for problems.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Things like this are normally installed in separate folders because that’s really the only sane way to set things up. Anything else is asking for problems.

    I strongly agree!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘change index.php to home.php’ is closed to new replies.