WordPress.org

Ready to get started?Download WordPress

Forums

getting wordpress to work on a site written in PHP (8 posts)

  1. kennonward
    Member
    Posted 1 year ago #

    My site is written in PHP. http://www.erivynn.com. The main entry point for the site is index.php in the root directory. WordPress uses this file in the root directory. This is a conflict for my site I need the index.php as the main entry point and wordpress needs it also. Is there any work around for this. I want to use wordpress as the blogging software. I have many reason for needing to have the site written in PHP. It was in HTML and I rewrote it in PHP to fix several maintenance issues now wordpress is not working because of the index.php conflict.
    Any assistance would be greatly appreciated.
    Thanks

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Your only real option is to re-install WordPress in a sub-folder.

  3. ClaytonJames
    Member
    Posted 1 year ago #

    Have you considered just installing WordPress in an appropriately named sub-directory? Or, you may also have the option of installing WordPress in it's own directory and creating a sub-domain for it, but you will need to check with your host for that information.

  4. kennonward
    Member
    Posted 1 year ago #

    I installed wordpress in its own sub-directory. WordPress needs or at least does not work on my system with out their copy of index.php in the root directory. My issue is I need index.php as the main file for my website. Is there a setting or hack for wordpress that will allow me use a file other than index.php in the root directory as the entry point for it.

  5. ClaytonJames
    Member
    Posted 1 year ago #

    WordPress needs or at least does not work on my system with out their copy of index.php in the root directory.

    Not accurate, if by "their copy" you mean the WordPress index.php file. Place all the WordPress files in the sub-directory, make sure the addresses in the WordPress dashboard include the sub-directory in the path, and it will work just fine.

  6. Marvel Labs
    Member
    Posted 1 year ago #

    Have you tried integrating both files, you can always include the functions you use in your index.php.

    You can then customize your theme to redirect to the root pages. or any where you wish to.

  7. kennonward
    Member
    Posted 1 year ago #

    Not accurate, if by "their copy" you mean the WordPress index.php file. Place all the WordPress files in the sub-directory, make sure the addresses in the WordPress dashboard include the sub-directory in the path, and it will work just fine.

    In the dashboard In the general tab I have the wordpress address (URL) as http://www.erivynn.com/wordpress
    the site address (URL) is set to http://www.erivynn.com
    In the Reading Setting tab I have the front page as HOME and the post page as Blog Page

    All of the wordpress files are in the wordpress directory.
    The Home page is a permalink defined as http://www.erivynn.com/
    and the Blog Page is defined as http://www.erivynn.com/blog-page/
    With my copy of index.php in the root directory the system shows my main page as the blog page. With the index.php supplied by wordpress it will show the blog page as the blog and the main page.
    So my question is very simple How do I set up wordpress to be accessed by my site written in PHP?
    If there is another place to define directories other than the Pages tab in the dashboard. I would like to know where they are what I have to set them to to make wordpress work on my site.

    Thanks to all for your assistance

  8. ClaytonJames
    Member
    Posted 1 year ago #

    If there is another place to define directories other than the Pages tab in the dashboard. I would like to know where they are what I have to set them to to make wordpress work on my site.

    There is no correlation between pages you create using the dashboard, and directories located on your web space. I believe the only place in your dashboard that defines or includes a path to an actual directory (other than uploads) is the addresses in general settings.

    You cannot serve two index.*. pages or (web sites) from the same directory at the same time. That's not a WordPress rule, it's a server issue. You have one site at root, and one site (wordpress) in a sub-directory. You can link to WordPress from anywhere in your root site without any issue and vice-versa, but you cannot serve both sites form root.

    Or, you can integrate. Integrating WordPress with Your Website

Topic Closed

This topic has been closed to new replies.

About this Topic